Automattic\WooCommerce\Admin\API\Reports\Coupons\Stats

Query{}WC 1.0

API\Reports\Coupons\Stats\Query

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

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

Методы

  1. public get_data()
  2. public load( 'report-coupons-stats' )
  3. public apply_filters( 'woocommerce_analytics_coupons_stats_query_args', $this->get_query_vars() )
  4. ERROR: no method name found on line ``
  5. ERROR: no method name found on line ``
  6. ERROR: no method name found on line ``
  7. ERROR: no method name found on line `class Query extends ReportsQuery {`
  8. ERROR: no method name found on line ``
  9. ERROR: no method name found on line ``
  10. ERROR: no method name found on line `*/`
  11. ERROR: no method name found on line `/**`
  12. public array()
  13. ERROR: no method name found on line `*/`
  14. protected get_default_query_vars()
  15. ERROR: no method name found on line ``
  16. ERROR: no method name found on line `}`
  17. ERROR: no method name found on line ``

Код Query{} WC 6.6.1

class Query extends ReportsQuery {

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

	/**
	 * Get product data based on the current query vars.
	 *
	 * @return array
	 */
	public function get_data() {
		$args = apply_filters( 'woocommerce_analytics_coupons_stats_query_args', $this->get_query_vars() );

		$data_store = \WC_Data_Store::load( 'report-coupons-stats' );
		$results    = $data_store->get_data( $args );
		return apply_filters( 'woocommerce_analytics_coupons_select_query', $results, $args );
	}

}