diff options
Diffstat (limited to 'plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php')
-rw-r--r-- | plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php b/plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php index b3fe7cd8..b1fcda47 100644 --- a/plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php +++ b/plugins/jetpack/modules/masterbar/admin-menu/class-dashboard-switcher-tracking.php @@ -97,8 +97,8 @@ class Dashboard_Switcher_Tracking { if ( class_exists( '\WPCOM_Store_API' ) ) { // @todo: Maybe introduce a wrapper for this since we are duplicating it from WPCOM_Admin_Menu:253 $products = \WPCOM_Store_API::get_current_plan( \get_current_blog_id() ); - if ( array_key_exists( 'product_name_short', $products ) ) { - return $products['product_name_short']; + if ( ! empty( $products['product_slug'] ) ) { + return $products['product_slug']; } } @@ -107,8 +107,8 @@ class Dashboard_Switcher_Tracking { // @todo: Maybe introduce a helper for this since we are duplicating it from Atomic_Admin_Menu:240 $products = Jetpack_Plan::get(); - if ( array_key_exists( 'product_name_short', $products ) ) { - return $products['product_name_short']; + if ( ! empty( $products['product_slug'] ) ) { + return $products['product_slug']; } return 'N/A'; // maybe we should return free or null? At the moment we use it for passing it to the event. |