Updated prefixes for wc-admin plugin.
This commit is contained in:
parent
429803cc25
commit
9ac635fd42
|
@ -31,51 +31,6 @@ class WC_Admin_REST_Reports_Controller extends WC_REST_Reports_Controller {
|
|||
*/
|
||||
protected $rest_base = 'reports';
|
||||
|
||||
/**
|
||||
* Get reports list.
|
||||
*
|
||||
* @since 3.5.0
|
||||
* @return array
|
||||
*/
|
||||
protected function get_reports() {
|
||||
$reports = parent::get_reports();
|
||||
|
||||
$reports[] = array(
|
||||
'slug' => 'orders/count',
|
||||
'description' => __( 'Orders stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'products/count',
|
||||
'description' => __( 'Customers stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'customers/count',
|
||||
'description' => __( 'Customers stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'coupons/count',
|
||||
'description' => __( 'Coupons stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'reviews/count',
|
||||
'description' => __( 'Reviews stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'categories/count',
|
||||
'description' => __( 'Categories stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'tags/count',
|
||||
'description' => __( 'Tags stats count.', 'woocommerce' ),
|
||||
);
|
||||
$reports[] = array(
|
||||
'slug' => 'attributes/count',
|
||||
'description' => __( 'Attributes stats count.', 'woocommerce' ),
|
||||
);
|
||||
|
||||
return $reports;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the routes for reports.
|
||||
*/
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/coupons/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Coupons_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Coupons_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/customers endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Customers_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Customers_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/downloads endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Downloads_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Downloads_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/downloads/files endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Downloads_Files_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Downloads_Files_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/downloads/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Downloads_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Downloads_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/orders/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Orders_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Orders_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
@ -63,7 +62,7 @@ class WC_REST_Reports_Orders_Stats_Controller extends WC_REST_Reports_Controller
|
|||
*/
|
||||
public function get_items( $request ) {
|
||||
$query_args = $this->prepare_reports_query( $request );
|
||||
$orders_query = new WC_Reports_Orders_Stats_Query( $query_args );
|
||||
$orders_query = new WC_Admin_Reports_Orders_Stats_Query( $query_args );
|
||||
$report_data = $orders_query->get_data();
|
||||
|
||||
$out_data = array(
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/products endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Products_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Products_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/products/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Products_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Products_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/revenue/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Revenue_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Revenue_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/taxes endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Taxes_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Taxes_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /reports/taxes/stats endpoint.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.5.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -16,7 +15,7 @@ defined( 'ABSPATH' ) || exit;
|
|||
* @package WooCommerce/API
|
||||
* @extends WC_REST_Reports_Controller
|
||||
*/
|
||||
class WC_REST_Reports_Taxes_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
class WC_Admin_REST_Reports_Taxes_Stats_Controller extends WC_REST_Reports_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
*
|
||||
* Handles requests to the /system_status/tools/* endpoints.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @since 3.0.0
|
||||
* @package WooCommerce Admin/API
|
||||
*/
|
||||
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
@ -13,10 +12,10 @@ defined( 'ABSPATH' ) || exit;
|
|||
/**
|
||||
* System status tools controller.
|
||||
*
|
||||
* @package WooCommerce/API
|
||||
* @extends WC_REST_System_Status_Tools_V2_Controller
|
||||
* @package WooCommerce Admin/API
|
||||
* @extends WC_REST_System_Status_Tools_Controller
|
||||
*/
|
||||
class WC_REST_System_Status_Tools_Controller extends WC_REST_System_Status_Tools_V2_Controller {
|
||||
class WC_Admin_REST_System_Status_Tools_Controller extends WC_REST_System_Status_Tools_Controller {
|
||||
|
||||
/**
|
||||
* Endpoint namespace.
|
||||
|
@ -56,7 +55,7 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_System_Status_Tools
|
|||
|
||||
switch ( $tool ) {
|
||||
case 'rebuild_stats':
|
||||
WC_Reports_Orders_Data_Store::queue_order_stats_repopulate_database();
|
||||
WC_Admin_Reports_Orders_Data_Store::queue_order_stats_repopulate_database();
|
||||
$message = __( 'Rebuilding reports data in the background . . .', 'woocommerce' );
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue