Merge pull request woocommerce/woocommerce-admin#646 from woocommerce/fix/lints-class-wc-admin-reports-products-query.php
Fixes PHP 5.2 compatibility issues
This commit is contained in:
commit
8b67f5f50d
|
@ -23,8 +23,6 @@ defined( 'ABSPATH' ) || exit;
|
||||||
*/
|
*/
|
||||||
class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query {
|
class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query {
|
||||||
|
|
||||||
const REPORT_NAME = 'report-products';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Valid fields for Products report.
|
* Valid fields for Products report.
|
||||||
*
|
*
|
||||||
|
@ -40,8 +38,10 @@ class WC_Admin_Reports_Products_Query extends WC_Admin_Reports_Query {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_data() {
|
public function get_data() {
|
||||||
$args = apply_filters( 'woocommerce_reports_products_query_args', $this->get_query_vars() );
|
$args = apply_filters( 'woocommerce_reports_products_query_args', $this->get_query_vars() );
|
||||||
$results = WC_Data_Store::load( $this::REPORT_NAME )->get_data( $args );
|
|
||||||
|
$data_store = WC_Data_Store::load( 'report-products' );
|
||||||
|
$results = $data_store->get_data( $args );
|
||||||
return apply_filters( 'woocommerce_reports_products_select_query', $results, $args );
|
return apply_filters( 'woocommerce_reports_products_select_query', $results, $args );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue