diff --git a/plugins/woocommerce/changelog/fix-option-notice-analytics-orders b/plugins/woocommerce/changelog/fix-option-notice-analytics-orders new file mode 100644 index 00000000000..2854bac4da4 --- /dev/null +++ b/plugins/woocommerce/changelog/fix-option-notice-analytics-orders @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fix get_options deprecated notice when viewing Analytics > Orders diff --git a/plugins/woocommerce/src/Admin/API/Options.php b/plugins/woocommerce/src/Admin/API/Options.php index 9614b17773f..836886fec81 100644 --- a/plugins/woocommerce/src/Admin/API/Options.php +++ b/plugins/woocommerce/src/Admin/API/Options.php @@ -202,6 +202,7 @@ class Options extends \WC_REST_Data_Controller { 'woocommerce_product_tour_modal_hidden', 'woocommerce_block_product_tour_shown', 'woocommerce_revenue_report_date_tour_shown', + 'woocommerce_orders_report_date_tour_shown', 'woocommerce_show_prepublish_checks_enabled', 'woocommerce_date_type', 'date_format', diff --git a/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js index 2d4c494bdf8..fe893b0808c 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/admin-analytics/analytics-data.spec.js @@ -9,6 +9,11 @@ const test = baseTest.extend( { woocommerce_task_list_reminder_bar_hidden: 'yes', } ); + // Disable the orders report date tour + await wcAdminApi.post( 'options', { + woocommerce_orders_report_date_tour_shown: 'yes', + } ); + // Disable the revenue report date tour await wcAdminApi.post( 'options', { woocommerce_revenue_report_date_tour_shown: 'yes',