Add grouped and external products to new experiment (#42934)
This commit is contained in:
parent
5d20ab5ffa
commit
a72f3ee7a2
|
@ -16,7 +16,7 @@ import { createNoticesFromResponse } from '../../../lib/notices';
|
|||
import { getAdminSetting } from '~/utils/admin-settings';
|
||||
|
||||
const EXPERIMENT_NAME =
|
||||
'woocommerce_product_creation_experience_add_digital_202311_v1';
|
||||
'woocommerce_product_creation_experience_add_external_and_grouped_202401_v1';
|
||||
|
||||
export const useCreateProductByType = () => {
|
||||
const { createProductFromTemplate } = useDispatch( ITEMS_STORE_NAME );
|
||||
|
@ -30,7 +30,9 @@ export const useCreateProductByType = () => {
|
|||
if (
|
||||
type === 'physical' ||
|
||||
type === 'variable' ||
|
||||
type === 'digital'
|
||||
type === 'digital' ||
|
||||
type === 'grouped' ||
|
||||
type === 'external'
|
||||
) {
|
||||
if ( isNewExperienceEnabled ) {
|
||||
navigateTo( { url: getNewPath( {}, '/add-product', {} ) } );
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: add
|
||||
|
||||
Add external and grouped products to the new A/B test of the product editor.
|
|
@ -21,8 +21,8 @@
|
|||
"onboarding-tasks": true,
|
||||
"product-variation-management": true,
|
||||
"product-virtual-downloadable": true,
|
||||
"product-external-affiliate": false,
|
||||
"product-grouped": false,
|
||||
"product-external-affiliate": true,
|
||||
"product-grouped": true,
|
||||
"remote-inbox-notifications": true,
|
||||
"remote-free-extensions": true,
|
||||
"payment-gateway-suggestions": true,
|
||||
|
|
|
@ -810,6 +810,16 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
|||
'hideConditions' => $product_inventory_quantity_hide_conditions,
|
||||
)
|
||||
);
|
||||
$product_stock_status_hide_conditions = array(
|
||||
array(
|
||||
'expression' => 'editedProduct.manage_stock === true',
|
||||
),
|
||||
);
|
||||
if ( Features::is_enabled( 'product-grouped' ) ) {
|
||||
$product_stock_status_hide_conditions[] = array(
|
||||
'expression' => 'editedProduct.type === "grouped"',
|
||||
);
|
||||
}
|
||||
$product_inventory_section->add_block(
|
||||
array(
|
||||
'id' => 'product-stock-status',
|
||||
|
@ -833,11 +843,7 @@ class SimpleProductTemplate extends AbstractProductFormTemplate implements Produ
|
|||
),
|
||||
),
|
||||
),
|
||||
'hideConditions' => array(
|
||||
array(
|
||||
'expression' => 'editedProduct.manage_stock === true',
|
||||
),
|
||||
),
|
||||
'hideConditions' => $product_stock_status_hide_conditions,
|
||||
)
|
||||
);
|
||||
$product_inventory_advanced = $product_inventory_section->add_block(
|
||||
|
|
Loading…
Reference in New Issue