WordPress at a glance
class is not described

Automattic\WooCommerce\Admin\API\Reports\Categories

Query{} WC 1.0

API\Reports\Query

Return

null. Nothing.

Usage

$Query = new Query();
// use class methods

Methods

  1. get_data()
  2. ERROR: no method name found on line ``
  3. ERROR: no method name found on line ``
  4. ERROR: no method name found on line ` * @return array`
  5. ERROR: no method name found on line ``
  6. ERROR: no method name found on line ` *`
  7. ERROR: no method name found on line ` *`
  8. ERROR: no method name found on line ` * @return array`
  9. ERROR: no method name found on line ` * @return array`
  10. array()
  11. ERROR: no method name found on line ` *`
  12. ERROR: no method name found on line ``
  13. ERROR: no method name found on line ` }`
  14. ERROR: no method name found on line ` }`
  15. ERROR: no method name found on line ` *`
  16. ERROR: no method name found on line ` * Valid fields for Categories report.`
  17. ERROR: no method name found on line ` * @return array`
  18. ERROR: no method name found on line ` * @return array`
  19. ERROR: no method name found on line ` *`
  20. ERROR: no method name found on line ` *`
  21. ERROR: no method name found on line ` *`
  22. ERROR: no method name found on line ` * @return array`
  23. ERROR: no method name found on line ` * @return array`
  24. ERROR: no method name found on line ` * Valid fields for Categories report.`
  25. ERROR: no method name found on line ``
  26. ERROR: no method name found on line ` * @return array`
  27. ERROR: no method name found on line ` * @return array`
  28. ERROR: no method name found on line ` * @return array`
  29. ERROR: no method name found on line ` *`
  30. ERROR: no method name found on line ` * @return array`
  31. ERROR: no method name found on line ` * @return array`
  32. get_default_query_vars()
  33. ERROR: no method name found on line ` */`

Code of Query{} WC 5.2.2

<?php
class Query extends ReportsQuery {

	const REPORT_NAME = 'report-categories';

	/**
	 * Valid fields for Categories report.
	 *
	 * @return array
	 */
	protected function get_default_query_vars() {
		return array();
	}

	/**
	 * Get categories data based on the current query vars.
	 *
	 * @return array
	 */
	public function get_data() {
		$args    = apply_filters( 'woocommerce_analytics_categories_query_args', $this->get_query_vars() );
		$results = \WC_Data_Store::load( self::REPORT_NAME )->get_data( $args );
		return apply_filters( 'woocommerce_analytics_categories_select_query', $results, $args );
	}
}