WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
класс не описан

Automattic\WooCommerce\Admin\API\Reports\Customers\Stats

Query{} WC 1.0

API\Reports\Customers\Stats\Query

Возвращает

Null. Ничего.

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

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

Методы

  1. get_data()
  2. get_data()
  3. ERROR: no method name found on line ` * @return array`
  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 ` }`
  8. ERROR: no method name found on line ` }`
  9. ERROR: no method name found on line ` }`
  10. ERROR: no method name found on line ` 'page' => 1,`
  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 ` * Get product data based on the current 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 ``
  18. get_default_query_vars()
  19. get_default_query_vars()
  20. ERROR: no method name found on line ``
  21. ERROR: no method name found on line ` */`
  22. get_default_query_vars()
  23. ERROR: no method name found on line ` */`
  24. ERROR: no method name found on line ` */`
  25. ERROR: no method name found on line ` */`
  26. array(
  27. get_default_query_vars()
  28. get_default_query_vars()
  29. ERROR: no method name found on line ` * @return array`
  30. get_option( 'posts_per_page' )
  31. get_default_query_vars()

Код Query{} WC 4.6.1

<?php
class Query extends ReportsQuery {

	/**
	 * Valid fields for Customers report.
	 *
	 * @return array
	 */
	protected function get_default_query_vars() {
		return array(
			'per_page' => get_option( 'posts_per_page' ), // not sure if this should be the default.
			'page'     => 1,
			'order'    => 'DESC',
			'orderby'  => 'date_registered',
			'fields'   => '*', // @todo Needed?
		);
	}

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

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