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.
|
* Adds a new group block.
|
||||||
*
|
*
|
||||||
* @param array $block_config block config.
|
* @param array $block_config block config.
|
||||||
* @return BlockInterface new block section.
|
* @return GroupInterface new group block.
|
||||||
*/
|
*/
|
||||||
public function add_group( array $block_config ): GroupInterface;
|
public function add_group( array $block_config ): GroupInterface;
|
||||||
|
|
||||||
|
|
|
@ -673,10 +673,10 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
||||||
);
|
);
|
||||||
$product_inventory_inner_section->add_block(
|
$product_inventory_inner_section->add_block(
|
||||||
array(
|
array(
|
||||||
'id' => 'product-track-stock',
|
'id' => 'product-track-stock',
|
||||||
'blockName' => 'woocommerce/product-toggle-field',
|
'blockName' => 'woocommerce/product-toggle-field',
|
||||||
'order' => 20,
|
'order' => 20,
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'label' => __( 'Track stock quantity for this product', 'woocommerce' ),
|
'label' => __( 'Track stock quantity for this product', 'woocommerce' ),
|
||||||
'property' => 'manage_stock',
|
'property' => 'manage_stock',
|
||||||
'disabled' => 'yes' !== get_option( 'woocommerce_manage_stock' ),
|
'disabled' => 'yes' !== get_option( 'woocommerce_manage_stock' ),
|
||||||
|
@ -687,6 +687,11 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
||||||
'</a>'
|
'</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(
|
$product_inventory_quantity_conditional = $product_inventory_inner_section->add_block(
|
||||||
|
|
Loading…
Reference in New Issue