diff --git a/plugins/woocommerce-admin/src/FeaturePlugin.php b/plugins/woocommerce-admin/src/FeaturePlugin.php index 488be40f1a8..56239987412 100644 --- a/plugins/woocommerce-admin/src/FeaturePlugin.php +++ b/plugins/woocommerce-admin/src/FeaturePlugin.php @@ -16,6 +16,7 @@ use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Woo_Subscriptions_Notes; use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Tracking_Opt_In; use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_WooCommerce_Payments; use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Install_JP_And_WCS_Plugins; +use \Automattic\WooCommerce\Admin\Notes\WC_Admin_Notes_Draw_Attention; /** * Feature plugin main class. @@ -186,6 +187,7 @@ class FeaturePlugin { new WC_Admin_Notes_Tracking_Opt_In(); new WC_Admin_Notes_WooCommerce_Payments(); new WC_Admin_Notes_Install_JP_And_WCS_Plugins(); + new WC_Admin_Notes_Draw_Attention(); } /** diff --git a/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Draw_Attention.php b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Draw_Attention.php new file mode 100644 index 00000000000..2628aeb28f3 --- /dev/null +++ b/plugins/woocommerce-admin/src/Notes/WC_Admin_Notes_Draw_Attention.php @@ -0,0 +1,79 @@ +get_notes_with_name( self::NOTE_NAME ); + if ( ! empty( $note_ids ) ) { + return; + } + + // Create the note. + $note = new WC_Admin_Note(); + + $note->set_title( __( 'How to draw attention to your online store', 'woocommerce-admin' ) ); + $note->set_content( __( 'To get you started, here are seven ways to boost your sales and avoid getting drowned out by similar, mass-produced products competing for the same buyers.', 'woocommerce-admin' ) ); + $note->set_content_data( (object) array() ); + $note->set_type( WC_ADMIN_Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); + $note->set_icon( 'info' ); + $note->set_name( self::NOTE_NAME ); + $note->set_source( 'woocommerce-admin' ); + $note->add_action( + 'learn-more', + __( 'Learn more', 'woocommerce-admin' ), + 'https://woocommerce.com/posts/how-to-make-your-online-store-stand-out/?utm_source=inbox', + WC_Admin_Note::E_WC_ADMIN_NOTE_ACTIONED, + true + ); + + $note->save(); + } +}