Added WC_Admin prefix for query classes where it was missing.

This commit is contained in:
Peter Fabian 2018-09-17 20:20:34 +02:00
parent e692c45c87
commit aa4035adb9
6 changed files with 18 additions and 34 deletions

View File

@ -2,9 +2,7 @@
/**
* Class for time interval handling for reports
*
* @package WooCommerce/Classes
* @version 3.5.0
* @since 3.5.0
* @package WooCommerce Admin/Classes
*/
defined( 'ABSPATH' ) || exit;
@ -66,7 +64,6 @@ class WC_Admin_Reports_Interval {
* @return int|null
*/
public static function quarter( $datetime ) {
// TODO: is there a smarter way? Is floor((m - 1)/3) + 1 better?
switch ( (int) $datetime->format( 'm' ) ) {
case 1:
case 2:

View File

@ -11,22 +11,20 @@
* 'coupons' => array(138),
* 'order_status' => array('completed'),
* );
* $report = new WC_Reports_Orders_Stats_Query( $args );
* $report = new WC_Admin_Reports_Orders_Stats_Query( $args );
* $mydata = $report->get_data();
*
* @package WooCommerce/Classes
* @version 3.5.0
* @since 3.5.0
* @package WooCommerce Admin/Classes
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Reports_Orders_Stats_Query
* WC_Admin_Reports_Orders_Stats_Query
*
* @version 3.5.0
*/
class WC_Reports_Orders_Stats_Query extends WC_Reports_Query {
class WC_Admin_Reports_Orders_Stats_Query extends WC_Admin_Reports_Query {
const REPORT_NAME = 'report-orders-stats';

View File

@ -10,12 +10,11 @@
* 'categories' => array(15, 18),
* 'products' => array(1,2,3)
* );
* $report = new WC_Reports_Products_Query( $args );
* $report = new WC_Admin_Reports_Products_Query( $args );
* $mydata = $report->get_data();
*
* @package WooCommerce/Classes
* @version 3.5.0
* @since 3.5.0
* @package WooCommerce Admin/Classes
*/
defined( 'ABSPATH' ) || exit;
@ -23,9 +22,8 @@ defined( 'ABSPATH' ) || exit;
/**
* WC_Reports_Products_Query
*
* @version 3.5.0
*/
class WC_Reports_Products_Query extends WC_Reports_Query {
class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query {
const REPORT_NAME = 'report-products';

View File

@ -14,8 +14,6 @@
* $mydata = $report->get_data();
*
* @package WooCommerce Admin/Classes
* @version 3.5.0
* @since 3.5.0
*/
defined( 'ABSPATH' ) || exit;
@ -23,7 +21,6 @@ defined( 'ABSPATH' ) || exit;
/**
* WC_Admin_Reports_Products_Query
*
* @version 3.5.0
*/
class WC_Admin_Reports_Products_Stats_Query extends WC_Admin_Reports_Query {

View File

@ -2,19 +2,16 @@
/**
* Class for parameter-based Reports querying
*
* @package WooCommerce/Classes
* @version 3.5.0
* @since 3.5.0
* @package WooCommerce Admin/Classes
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Reports_Query
* WC_Admin_Reports_Query
*
* @version 3.5.0
*/
abstract class WC_Reports_Query extends WC_Object_Query {
abstract class WC_Admin_Reports_Query extends WC_Object_Query {
/**
* Get report data matching the current query vars.

View File

@ -8,22 +8,19 @@
* 'after' => '2018-07-05 00:00:00',
* 'interval' => 'week',
* );
* $report = new WC_Reports_Revenue_Query( $args );
* $report = new WC_Admin_Reports_Revenue_Query( $args );
* $mydata = $report->get_data();
*
* @package WooCommerce/Classes
* @version 3.5.0
* @since 3.5.0
* @package WooCommerce Admin/Classes
*/
defined( 'ABSPATH' ) || exit;
/**
* WC_Reports_Revenue_Query
* WC_Admin_Reports_Revenue_Query
*
* @version 3.5.0
*/
class WC_Reports_Revenue_Query extends WC_Reports_Query {
class WC_Admin_Reports_Revenue_Query extends WC_Admin_Reports_Query {
const REPORT_NAME = 'report-revenue-stats';