Fixes PHP 5.2 compatibility issues
This commit is contained in:
parent
03c8e42364
commit
39ee05cc70
|
@ -24,8 +24,6 @@ defined( 'ABSPATH' ) || exit;
|
|||
*/
|
||||
class WC_Admin_Reports_Orders_Stats_Query extends WC_Admin_Reports_Query {
|
||||
|
||||
const REPORT_NAME = 'report-orders-stats';
|
||||
|
||||
/**
|
||||
* Valid fields for Orders report.
|
||||
*
|
||||
|
@ -48,8 +46,10 @@ class WC_Admin_Reports_Orders_Stats_Query extends WC_Admin_Reports_Query {
|
|||
* @return array
|
||||
*/
|
||||
public function get_data() {
|
||||
$args = apply_filters( 'woocommerce_reports_orders_stats_query_args', $this->get_query_vars() );
|
||||
$results = WC_Data_Store::load( $this::REPORT_NAME )->get_data( $args );
|
||||
$args = apply_filters( 'woocommerce_reports_orders_stats_query_args', $this->get_query_vars() );
|
||||
|
||||
$data_store = WC_Data_Store::load( 'report-orders-stats' );
|
||||
$results = $data_store->get_data( $args );
|
||||
return apply_filters( 'woocommerce_reports_orders_stats_select_query', $results, $args );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue