diff --git a/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php b/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php index 56b0e4cd6ca..46d3d9972f2 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php +++ b/plugins/woocommerce/tests/legacy/unit-tests/admin/class-wc-tests-admin-dashboard.php @@ -5,6 +5,8 @@ * @package WooCommerce\Tests\Admin */ +use Automattic\WooCommerce\Utilities\OrderUtil; + /** * Tests for the WC_Admin_Report class. */ @@ -37,6 +39,9 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case { * Test: get_status_widget */ public function test_status_widget() { + if ( OrderUtil::custom_orders_table_usage_is_enabled() ) { + $this->markTestSkipped( 'We don\'t support legacy reports in HPOS.' ); + } wp_set_current_user( $this->user ); $order = WC_Helper_Order::create_order(); $order->set_status( 'completed' ); @@ -58,6 +63,9 @@ class WC_Tests_Admin_Dashboard extends WC_Unit_Test_Case { * Test: get_status_widget with woo admin disabled. */ public function test_status_widget_with_woo_admin_disabled() { + if ( OrderUtil::custom_orders_table_usage_is_enabled() ) { + $this->markTestSkipped( 'We don\'t support legacy reports in HPOS.' ); + } wp_set_current_user( $this->user ); $order = WC_Helper_Order::create_order(); $order->set_status( 'completed' );