diff --git a/plugins/woocommerce-admin/src/Events.php b/plugins/woocommerce-admin/src/Events.php index 84fe8bc34ee..d69c0c4c3d5 100644 --- a/plugins/woocommerce-admin/src/Events.php +++ b/plugins/woocommerce-admin/src/Events.php @@ -37,6 +37,7 @@ use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Customize_Store_With_Bloc use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Facebook_Marketing_Expert; use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Test_Checkout; use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Edit_Products_On_The_Move; +use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Performance_On_Mobile; /** * WC_Admin_Events Class. @@ -107,6 +108,7 @@ class Events { WC_Admin_Notes_Facebook_Marketing_Expert::possibly_add_note(); WC_Admin_Notes_Test_Checkout::possibly_add_note(); WC_Admin_Notes_Edit_Products_On_The_Move::possibly_add_note(); + WC_Admin_Notes_Performance_On_Mobile::possibly_add_note(); if ( Loader::is_feature_enabled( 'remote-inbox-notifications' ) ) { DataSourcePoller::read_specs_from_data_sources(); diff --git a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Edit_Products_On_The_Move.php b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Edit_Products_On_The_Move.php index 6bf3dd6fbee..00590a919e6 100644 --- a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Edit_Products_On_The_Move.php +++ b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Edit_Products_On_The_Move.php @@ -42,6 +42,10 @@ class WC_Admin_Notes_Edit_Products_On_The_Move { return; } + if ( WC_Admin_Notes_Performance_On_Mobile::has_note_been_actioned() ) { + return; + } + $note = new WC_Admin_Note(); $note->set_title( __( 'Edit products on the move', 'woocommerce-admin' ) ); diff --git a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Performance_On_Mobile.php b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Performance_On_Mobile.php new file mode 100644 index 00000000000..e937811c1a4 --- /dev/null +++ b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Performance_On_Mobile.php @@ -0,0 +1,61 @@ +set_title( __( 'Track your store performance on mobile', 'woocommerce-admin' ) ); + $note->set_content( __( 'Monitor your sales and high performing products with the Woo app.', 'woocommerce-admin' ) ); + $note->set_content_data( (object) array() ); + $note->set_type( WC_Admin_Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); + $note->set_name( self::NOTE_NAME ); + $note->set_source( 'woocommerce-admin' ); + $note->add_action( + 'learn-more', + __( 'Learn more', 'woocommerce-admin' ), + 'https://woocommerce.com/mobile/?utm_source=inbox' + ); + + return $note; + } +}