From b4d71224e62566b0b7fc859c6ee999213db3e536 Mon Sep 17 00:00:00 2001 From: Jeff Stieler Date: Wed, 24 Jun 2020 17:10:54 -0400 Subject: [PATCH] Remove unnecessary rest API init action. (https://github.com/woocommerce/woocommerce-admin/pull/4691) --- plugins/woocommerce-admin/src/ReportCSVExporter.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/woocommerce-admin/src/ReportCSVExporter.php b/plugins/woocommerce-admin/src/ReportCSVExporter.php index e12cf5bc98f..efc75314636 100644 --- a/plugins/woocommerce-admin/src/ReportCSVExporter.php +++ b/plugins/woocommerce-admin/src/ReportCSVExporter.php @@ -121,10 +121,6 @@ class ReportCSVExporter extends \WC_CSV_Batch_Exporter { if ( isset( $controller_map[ $this->report_type ] ) ) { // Load the controllers if accessing outside the REST API. - if ( ! did_action( 'rest_api_init' ) ) { - do_action( 'rest_api_init' ); - } - return new $controller_map[ $this->report_type ](); }