diff --git a/plugins/woocommerce-admin/tests/api/reports-orders-stats.php b/plugins/woocommerce-admin/tests/api/reports-orders-stats.php index cf4d2e3bd9b..893e5c95614 100644 --- a/plugins/woocommerce-admin/tests/api/reports-orders-stats.php +++ b/plugins/woocommerce-admin/tests/api/reports-orders-stats.php @@ -132,6 +132,11 @@ class WC_Tests_API_Reports_Orders_Stats extends WC_REST_Unit_Test_Case { * Test filtering by product attribute(s). */ public function test_product_attributes_filter() { + global $wp_version; + if ( version_compare( $wp_version, '5.5', '<' ) ) { + $this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' ); + } + global $wpdb; wp_set_current_user( $this->user ); WC_Helper_Reports::reset_stats_dbs(); diff --git a/plugins/woocommerce-admin/tests/api/reports-orders.php b/plugins/woocommerce-admin/tests/api/reports-orders.php index 15ae71434cb..fa50f8413f1 100644 --- a/plugins/woocommerce-admin/tests/api/reports-orders.php +++ b/plugins/woocommerce-admin/tests/api/reports-orders.php @@ -133,6 +133,11 @@ class WC_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case { * Test filtering by taxonomy-backed product attribute(s). */ public function test_product_attributes_filter() { + global $wp_version; + if ( version_compare( $wp_version, '5.5', '<' ) ) { + $this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' ); + } + wp_set_current_user( $this->user ); WC_Helper_Reports::reset_stats_dbs(); @@ -236,6 +241,11 @@ class WC_Tests_API_Reports_Orders extends WC_REST_Unit_Test_Case { * Test filtering by custom product attribute(s). */ public function test_custom_product_attributes_filter() { + global $wp_version; + if ( version_compare( $wp_version, '5.5', '<' ) ) { + $this->markTestSkipped( 'Skipped in older versions of WordPress due to a bug in WP when validating arrays.' ); + } + wp_set_current_user( $this->user ); WC_Helper_Reports::reset_stats_dbs();