Fix deprecated get_option notice when viewing Analytics > Orders (#49092)

* Add option for orders_report_date_tour_shown to allow list

* Disable the orders report date tour in E2E test
This commit is contained in:
Mik 2024-07-04 16:09:58 +01:00 committed by GitHub
parent 04fa888b2f
commit cf7fc7b2a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Fix get_options deprecated notice when viewing Analytics > Orders

View File

@ -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',

View File

@ -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',