Merge branch 'trunk' into update/product-editor-add-variation-pickup-help
This commit is contained in:
commit
abe33ded3d
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Hide track stock quantity toogle when the product type is external
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Correct return type of ProductFormTemplateInterface::add_group() method.
|
|
@ -14,7 +14,7 @@ interface ProductFormTemplateInterface extends BlockTemplateInterface {
|
|||
* Adds a new group block.
|
||||
*
|
||||
* @param array $block_config block config.
|
||||
* @return BlockInterface new block section.
|
||||
* @return GroupInterface new group block.
|
||||
*/
|
||||
public function add_group( array $block_config ): GroupInterface;
|
||||
|
||||
|
|
|
@ -673,10 +673,10 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
|||
);
|
||||
$product_inventory_inner_section->add_block(
|
||||
array(
|
||||
'id' => 'product-track-stock',
|
||||
'blockName' => 'woocommerce/product-toggle-field',
|
||||
'order' => 20,
|
||||
'attributes' => array(
|
||||
'id' => 'product-track-stock',
|
||||
'blockName' => 'woocommerce/product-toggle-field',
|
||||
'order' => 20,
|
||||
'attributes' => array(
|
||||
'label' => __( 'Track stock quantity for this product', 'woocommerce' ),
|
||||
'property' => 'manage_stock',
|
||||
'disabled' => 'yes' !== get_option( 'woocommerce_manage_stock' ),
|
||||
|
@ -687,6 +687,11 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
|||
'</a>'
|
||||
),
|
||||
),
|
||||
'hideConditions' => Features::is_enabled( 'product-external-affiliate' ) ? array(
|
||||
array(
|
||||
'expression' => 'editedProduct.type === "external"',
|
||||
),
|
||||
) : null,
|
||||
)
|
||||
);
|
||||
$product_inventory_quantity_conditional = $product_inventory_inner_section->add_block(
|
||||
|
|
Loading…
Reference in New Issue