From b58043380e38311b1b09695db10302af480b0768 Mon Sep 17 00:00:00 2001 From: Jonathan Belcher Date: Tue, 23 Oct 2018 12:47:51 -0400 Subject: [PATCH] Fixes PHP 5.2 compatibility issues --- .../includes/class-wc-admin-reports-products-query.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/woocommerce-admin/includes/class-wc-admin-reports-products-query.php b/plugins/woocommerce-admin/includes/class-wc-admin-reports-products-query.php index 628050d2051..60d359b615a 100644 --- a/plugins/woocommerce-admin/includes/class-wc-admin-reports-products-query.php +++ b/plugins/woocommerce-admin/includes/class-wc-admin-reports-products-query.php @@ -23,8 +23,6 @@ defined( 'ABSPATH' ) || exit; */ class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query { - const REPORT_NAME = 'report-products'; - /** * Valid fields for Products report. * @@ -40,8 +38,10 @@ class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query { * @return array */ public function get_data() { - $args = apply_filters( 'woocommerce_reports_products_query_args', $this->get_query_vars() ); - $results = WC_Data_Store::load( $this::REPORT_NAME )->get_data( $args ); + $args = apply_filters( 'woocommerce_reports_products_query_args', $this->get_query_vars() ); + + $data_store = WC_Data_Store::load( 'report-products' ); + $results = $data_store->get_data( $args ); return apply_filters( 'woocommerce_reports_products_select_query', $results, $args ); }