diff --git a/plugins/woocommerce-admin/bin/generate-feature-config.php b/plugins/woocommerce-admin/bin/generate-feature-config.php index 0fbe969a755..4dd23a67965 100644 --- a/plugins/woocommerce-admin/bin/generate-feature-config.php +++ b/plugins/woocommerce-admin/bin/generate-feature-config.php @@ -23,12 +23,14 @@ if ( 'core' !== $phase ) { $write = "features as $feature => $bool ) { - $write .= "\t\t'{$feature}' => " . ( $bool ? 'true' : 'false' ) . ",\n"; + $write .= "\t\t\t'{$feature}' => " . ( $bool ? 'true' : 'false' ) . ",\n"; } - $write .= "\t);\n"; + $write .= "\t\t);\n"; + $write .= "\t}\n"; $write .= "}\n"; $config_file = fopen( 'includes/feature-config.php', 'w' ); diff --git a/plugins/woocommerce-admin/tests/api/reports-stock-stats.php b/plugins/woocommerce-admin/tests/api/reports-stock-stats.php index a4e0e95d54e..a670839c2ae 100644 --- a/plugins/woocommerce-admin/tests/api/reports-stock-stats.php +++ b/plugins/woocommerce-admin/tests/api/reports-stock-stats.php @@ -94,6 +94,14 @@ class WC_Tests_API_Reports_Stock_Stats extends WC_REST_Unit_Test_Case { $backorder_stock->set_stock_status( 'onbackorder' ); $backorder_stock->save(); + // Clear caches + delete_transient( 'wc_admin_stock_count_lowstock' ); + delete_transient( 'wc_admin_stock_count_outofstock' ); + delete_transient( 'wc_admin_stock_count_onbackorder' ); + delete_transient( 'wc_admin_stock_count_lowstock' ); + delete_transient( 'wc_admin_stock_count_instock' ); + delete_transient( 'wc_admin_product_count' ); + $request = new WP_REST_Request( 'GET', $this->endpoint ); $response = $this->server->dispatch( $request ); $reports = $response->get_data();