Update the product types to use IDs (https://github.com/woocommerce/woocommerce-admin/pull/2841)
This commit is contained in:
parent
55fe83c70b
commit
fbcd38acea
|
@ -119,19 +119,19 @@ class Onboarding {
|
||||||
),
|
),
|
||||||
'subscriptions' => array(
|
'subscriptions' => array(
|
||||||
'label' => __( 'Subscriptions', 'woocommerce-admin' ),
|
'label' => __( 'Subscriptions', 'woocommerce-admin' ),
|
||||||
'product' => 'woocommerce-subscriptions',
|
'product' => 27147,
|
||||||
),
|
),
|
||||||
'memberships' => array(
|
'memberships' => array(
|
||||||
'label' => __( 'Memberships', 'woocommerce-admin' ),
|
'label' => __( 'Memberships', 'woocommerce-admin' ),
|
||||||
'product' => 'woocommerce-memberships',
|
'product' => 958589,
|
||||||
),
|
),
|
||||||
'composite' => array(
|
'composite' => array(
|
||||||
'label' => __( 'Composite Products', 'woocommerce-admin' ),
|
'label' => __( 'Composite Products', 'woocommerce-admin' ),
|
||||||
'product' => 'woocommerce-composite-products',
|
'product' => 216836,
|
||||||
),
|
),
|
||||||
'bookings' => array(
|
'bookings' => array(
|
||||||
'label' => __( 'Bookings', 'woocommerce-admin' ),
|
'label' => __( 'Bookings', 'woocommerce-admin' ),
|
||||||
'product' => 'WooCommerce Bookings',
|
'product' => 390890,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -267,9 +267,9 @@ class Onboarding {
|
||||||
$product_data = json_decode( $woocommerce_products['body'] );
|
$product_data = json_decode( $woocommerce_products['body'] );
|
||||||
$products = array();
|
$products = array();
|
||||||
|
|
||||||
// Map product data by slug.
|
// Map product data by ID.
|
||||||
foreach ( $product_data->products as $product_datum ) {
|
foreach ( $product_data->products as $product_datum ) {
|
||||||
$products[ $product_datum->slug ] = $product_datum;
|
$products[ $product_datum->id ] = $product_datum;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loop over product types and append data.
|
// Loop over product types and append data.
|
||||||
|
|
Loading…
Reference in New Issue