From 0533ad40af6f77bc760062606099a98343f53966 Mon Sep 17 00:00:00 2001 From: Nestor Soriano Date: Wed, 4 Oct 2023 11:26:29 +0200 Subject: [PATCH] Improve the TODO comments in the admin notice add and remove methods --- .../woocommerce/includes/admin/class-wc-admin-notices.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-notices.php b/plugins/woocommerce/includes/admin/class-wc-admin-notices.php index 9d5d909ea29..4f57fd287ba 100644 --- a/plugins/woocommerce/includes/admin/class-wc-admin-notices.php +++ b/plugins/woocommerce/includes/admin/class-wc-admin-notices.php @@ -122,10 +122,12 @@ class WC_Admin_Notices { self::maybe_add_legacy_api_removal_notice(); } + // phpcs:disable Generic.Commenting.Todo.TaskFound + /** * Add an admin notice about the removal of the Legacy REST API if the said API is enabled. * - * TODO: Remove this method in WooCommerce 9.0. + * TODO: Change this method in WooCommerce 9.0 so that it checks if the Legacy REST API extension is installed, and if not, it points to the extension URL in the WordPress plugins directory. */ private static function maybe_add_legacy_api_removal_notice() { if ( 'yes' !== get_option( 'woocommerce_api_enabled' ) ) { @@ -153,7 +155,7 @@ class WC_Admin_Notices { /** * Remove the admin notice about the removal of the Legacy REST API if the said API is disabled. * - * TODO: Remove this method in WooCommerce 9.0. + * TODO: Change this method in WooCommerce 9.0 so that the notice gets removed if the Legacy REST API extension is installed and active. */ private static function maybe_remove_legacy_api_removal_notice() { if ( 'yes' !== get_option( 'woocommerce_api_enabled' ) && self::has_notice( 'legacy_api_removed_in_woo_90' ) ) { @@ -161,6 +163,8 @@ class WC_Admin_Notices { } } + // phpcs:enable Generic.Commenting.Todo.TaskFound + /** * Show a notice. *