Automattic\WooCommerce\Admin\API\Reports\Categories

Query{}WC 1.0

API\Reports\Query

Использование

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

Методы

  1. public get_data()
  2. ERROR: no method name found on line ``
  3. public array()
  4. ERROR: no method name found on line `* @return array`
  5. ERROR: no method name found on line `* @return array`
  6. ERROR: no method name found on line ``
  7. ERROR: no method name found on line ``
  8. ERROR: no method name found on line `}`
  9. ERROR: no method name found on line `}`
  10. ERROR: no method name found on line `* @return array`
  11. ERROR: no method name found on line `* @return array`
  12. ERROR: no method name found on line `* Valid fields for Categories report.`
  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 `* @return array`
  17. ERROR: no method name found on line `*`
  18. ERROR: no method name found on line ``
  19. protected get_default_query_vars()
  20. ERROR: no method name found on line `*/`
  21. ERROR: no method name found on line `* @return array`
  22. ERROR: no method name found on line `* @return array`
  23. ERROR: no method name found on line `* Valid fields for Categories report.`
  24. ERROR: no method name found on line `* @return array`
  25. ERROR: no method name found on line `* @return array`
  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 ``
  29. ERROR: no method name found on line `*`
  30. ERROR: no method name found on line `*`
  31. ERROR: no method name found on line `*`
  32. ERROR: no method name found on line `* @return array`
  33. ERROR: no method name found on line `*`

Код Query{} WC 9.0.2

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 );
	}
}