From 71554c3fedbc4d057956927652f54b248309a9e1 Mon Sep 17 00:00:00 2001 From: Jessy Date: Thu, 27 Feb 2025 18:33:34 +0530 Subject: [PATCH 1/3] Removes 60 day survey - Stop adding the 60 day survey - Remove the survey note if already added. --- includes/class-wc-payments.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-payments.php b/includes/class-wc-payments.php index 4149785dede..50c875292c5 100644 --- a/includes/class-wc-payments.php +++ b/includes/class-wc-payments.php @@ -348,6 +348,7 @@ public static function init() { } add_action( 'admin_init', [ __CLASS__, 'add_woo_admin_notes' ] ); + add_action( 'admin_init', [ __CLASS__, 'remove_deprecated_notes' ] ); add_action( 'init', [ __CLASS__, 'install_actions' ] ); add_action( 'woocommerce_blocks_payment_method_type_registration', [ __CLASS__, 'register_checkout_gateway' ] ); @@ -1501,9 +1502,6 @@ public static function add_woo_admin_notes() { } if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '4.4.0', '>=' ) ) { - require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-qualitative-feedback.php'; - WC_Payments_Notes_Qualitative_Feedback::possibly_add_note(); - require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-set-https-for-checkout.php'; WC_Payments_Notes_Set_Https_For_Checkout::possibly_add_note(); @@ -1519,6 +1517,19 @@ public static function add_woo_admin_notes() { add_filter( 'admin_notices', [ __CLASS__, 'wcpay_show_old_woocommerce_for_hungary_sweden_and_czech_republic' ] ); } + /** + * Removes deprecated notes i.e. no longer required notes. + * + * @return void + */ + public static function remove_deprecated_notes() { + if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '4.4.0', '>=' ) ) { + require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-qualitative-feedback.php'; + WC_Payments_Notes_Qualitative_Feedback::possibly_delete_note(); + + } + } + /** * Shows an alert notice for Norwegian merchants on WooCommerce 7.4 and below */ From 6eccf360e80e67ff4cf480ecd06f510b694b37fc Mon Sep 17 00:00:00 2001 From: Jessy Date: Thu, 27 Feb 2025 18:37:48 +0530 Subject: [PATCH 2/3] remove whitespace --- includes/class-wc-payments.php | 1 - 1 file changed, 1 deletion(-) diff --git a/includes/class-wc-payments.php b/includes/class-wc-payments.php index 50c875292c5..fbd6c664ddd 100644 --- a/includes/class-wc-payments.php +++ b/includes/class-wc-payments.php @@ -1526,7 +1526,6 @@ public static function remove_deprecated_notes() { if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '4.4.0', '>=' ) ) { require_once WCPAY_ABSPATH . 'includes/notes/class-wc-payments-notes-qualitative-feedback.php'; WC_Payments_Notes_Qualitative_Feedback::possibly_delete_note(); - } } From 3ba5e95e9497cb473bb63da88981d46a3383e03a Mon Sep 17 00:00:00 2001 From: Jessy Date: Thu, 27 Feb 2025 18:40:13 +0530 Subject: [PATCH 3/3] added changelog --- changelog/update-10325-remove-60-day-survey | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog/update-10325-remove-60-day-survey diff --git a/changelog/update-10325-remove-60-day-survey b/changelog/update-10325-remove-60-day-survey new file mode 100644 index 00000000000..74540e80e4d --- /dev/null +++ b/changelog/update-10325-remove-60-day-survey @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Removed the admin note to take the 60 day survey.