From fbcd38acea8ea12d0cf7bcba1fda73661180eda8 Mon Sep 17 00:00:00 2001 From: Joshua T Flowers Date: Tue, 27 Aug 2019 11:24:19 +0800 Subject: [PATCH] Update the product types to use IDs (https://github.com/woocommerce/woocommerce-admin/pull/2841) --- .../woocommerce-admin/src/Features/Onboarding.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/woocommerce-admin/src/Features/Onboarding.php b/plugins/woocommerce-admin/src/Features/Onboarding.php index ae798ca20a9..800df4122a0 100644 --- a/plugins/woocommerce-admin/src/Features/Onboarding.php +++ b/plugins/woocommerce-admin/src/Features/Onboarding.php @@ -119,19 +119,19 @@ class Onboarding { ), 'subscriptions' => array( 'label' => __( 'Subscriptions', 'woocommerce-admin' ), - 'product' => 'woocommerce-subscriptions', + 'product' => 27147, ), 'memberships' => array( 'label' => __( 'Memberships', 'woocommerce-admin' ), - 'product' => 'woocommerce-memberships', + 'product' => 958589, ), 'composite' => array( 'label' => __( 'Composite Products', 'woocommerce-admin' ), - 'product' => 'woocommerce-composite-products', + 'product' => 216836, ), 'bookings' => array( 'label' => __( 'Bookings', 'woocommerce-admin' ), - 'product' => 'WooCommerce Bookings', + 'product' => 390890, ), ) ); @@ -267,9 +267,9 @@ class Onboarding { $product_data = json_decode( $woocommerce_products['body'] ); $products = array(); - // Map product data by slug. + // Map product data by ID. 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.