From 00289ddb9169e17c80edd539bb1085089d51bd9a Mon Sep 17 00:00:00 2001 From: Moon Date: Wed, 6 Jan 2021 22:39:22 -0800 Subject: [PATCH] Remove HomeScreenFeedback note (https://github.com/woocommerce/woocommerce-admin/pull/6014) * Remove HomeScreenFeedback * Add wc-admin-home-screen-feedback to the obsolete_notes list --- plugins/woocommerce-admin/src/Events.php | 2 - .../woocommerce-admin/src/FeaturePlugin.php | 2 - plugins/woocommerce-admin/src/Install.php | 1 + .../src/Notes/DeprecatedNotes.php | 21 ----- .../src/Notes/HomeScreenFeedback.php | 82 ------------------- 5 files changed, 1 insertion(+), 107 deletions(-) delete mode 100644 plugins/woocommerce-admin/src/Notes/HomeScreenFeedback.php diff --git a/plugins/woocommerce-admin/src/Events.php b/plugins/woocommerce-admin/src/Events.php index 9d1d70e4916..7f0dab3490c 100644 --- a/plugins/woocommerce-admin/src/Events.php +++ b/plugins/woocommerce-admin/src/Events.php @@ -29,7 +29,6 @@ use \Automattic\WooCommerce\Admin\RemoteInboxNotifications\DataSourcePoller; use \Automattic\WooCommerce\Admin\RemoteInboxNotifications\RemoteInboxNotificationsEngine; use \Automattic\WooCommerce\Admin\Loader; use \Automattic\WooCommerce\Admin\Notes\InsightFirstSale; -use \Automattic\WooCommerce\Admin\Notes\HomeScreenFeedback; use \Automattic\WooCommerce\Admin\Notes\NeedSomeInspiration; use \Automattic\WooCommerce\Admin\Notes\OnlineClothingStore; use \Automattic\WooCommerce\Admin\Notes\FirstProduct; @@ -101,7 +100,6 @@ class Events { MigrateFromShopify::possibly_add_note(); InsightFirstSale::possibly_add_note(); LaunchChecklist::possibly_add_note(); - HomeScreenFeedback::possibly_add_note(); NeedSomeInspiration::possibly_add_note(); OnlineClothingStore::possibly_add_note(); FirstProduct::possibly_add_note(); diff --git a/plugins/woocommerce-admin/src/FeaturePlugin.php b/plugins/woocommerce-admin/src/FeaturePlugin.php index 3b45a0399b1..f3c45b00343 100644 --- a/plugins/woocommerce-admin/src/FeaturePlugin.php +++ b/plugins/woocommerce-admin/src/FeaturePlugin.php @@ -17,7 +17,6 @@ use \Automattic\WooCommerce\Admin\Notes\InstallJPAndWCSPlugins; use \Automattic\WooCommerce\Admin\Notes\DrawAttention; use \Automattic\WooCommerce\Admin\Notes\CouponPageMoved; use \Automattic\WooCommerce\Admin\RemoteInboxNotifications\RemoteInboxNotificationsEngine; -use \Automattic\WooCommerce\Admin\Notes\HomeScreenFeedback; use \Automattic\WooCommerce\Admin\Notes\SetUpAdditionalPaymentTypes; use \Automattic\WooCommerce\Admin\Notes\TestCheckout; use \Automattic\WooCommerce\Admin\Notes\SellingOnlineCourses; @@ -188,7 +187,6 @@ class FeaturePlugin { new WooCommercePayments(); new InstallJPAndWCSPlugins(); new DrawAttention(); - new HomeScreenFeedback(); new SetUpAdditionalPaymentTypes(); new TestCheckout(); new SellingOnlineCourses(); diff --git a/plugins/woocommerce-admin/src/Install.php b/plugins/woocommerce-admin/src/Install.php index 95a7a6258c0..5ea94fa9af9 100644 --- a/plugins/woocommerce-admin/src/Install.php +++ b/plugins/woocommerce-admin/src/Install.php @@ -479,6 +479,7 @@ class Install { 'wc-admin-onboarding-profiler-reminder', 'wc-admin-historical-data', 'wc-admin-review-shipping-settings', + 'wc-admin-home-screen-feedback', ); $additional_obsolete_notes_names = apply_filters( diff --git a/plugins/woocommerce-admin/src/Notes/DeprecatedNotes.php b/plugins/woocommerce-admin/src/Notes/DeprecatedNotes.php index 450a2a86552..9979ffe9ee7 100644 --- a/plugins/woocommerce-admin/src/Notes/DeprecatedNotes.php +++ b/plugins/woocommerce-admin/src/Notes/DeprecatedNotes.php @@ -285,27 +285,6 @@ class WC_Admin_Notes_Giving_Feedback_Notes extends DeprecatedClassFacade { protected static $deprecated_in_version = '1.7.0'; } -/** - * WC_Admin_Notes_Home_Screen_Feedback. - * - * @deprecated since 1.7.0, use HomeScreenFeedback - */ -class WC_Admin_Notes_Home_Screen_Feedback extends DeprecatedClassFacade { - /** - * The name of the non-deprecated class that this facade covers. - * - * @var string - */ - protected static $facade_over_classname = 'Automattic\WooCommerce\Admin\Notes\HomeScreenFeedback'; - - /** - * The version that this class was deprecated in. - * - * @var string - */ - protected static $deprecated_in_version = '1.7.0'; -} - /** * WC_Admin_Notes_Insight_First_Sale. * diff --git a/plugins/woocommerce-admin/src/Notes/HomeScreenFeedback.php b/plugins/woocommerce-admin/src/Notes/HomeScreenFeedback.php deleted file mode 100644 index 43470f056ed..00000000000 --- a/plugins/woocommerce-admin/src/Notes/HomeScreenFeedback.php +++ /dev/null @@ -1,82 +0,0 @@ -set_title( __( 'Help us improve the WooCommerce Home screen', 'woocommerce-admin' ) ); - $note->set_content( __( 'We\'d love your input to shape the future of the WooCommerce Home screen together. Feel free to share any feedback, ideas or suggestions that you have.', 'woocommerce-admin' ) ); - $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); - $note->set_name( self::NOTE_NAME ); - $note->set_content_data( (object) array() ); - $note->set_source( 'woocommerce-admin' ); - $note->add_action( - 'home-screen-feedback-share-feedback', - __( 'Share feedback', 'woocommerce-admin' ), - 'https://automattic.survey.fm/home-screen-survey' - ); - - return $note; - } -}