Automattic\WooCommerce\Admin\API\Reports\Categories
Query{}└─ ReportsQuery
Устарела с версии 9.3.0. Больше не поддерживается и может быть удалена. Используйте
`GenericQuery`, \WC_Object_Query`, or use `DataStore` directly
.API\Reports\Categories\Query
Хуки из класса
Использование
$Query = new Query(); // use class methods
Методы
- ERROR: no method name found on line ``
- public get_data()
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `*`
- protected get_default_query_vars()
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line ``
- public load( self::REPORT_NAME )->get_data( $args )
- ERROR: no method name found on line `*`
- ERROR: no method name found on line ``
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line ``
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `}`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `*`
- public array()
- ERROR: no method name found on line `* @return array`
- ERROR: no method name found on line `*`
- ERROR: no method name found on line `* @return array`
Список изменений
Устарела с 9.3.0 | Categories\Query class is deprecated. Please use GenericQuery, \WC_Object_Query, or useDataStore` directly. |
Код Query{} Query{} WC 9.9.3
class Query extends ReportsQuery { const REPORT_NAME = 'report-categories'; /** * Valid fields for Categories report. * * @deprecated 9.3.0 Categories\Query class is deprecated. Please use `GenericQuery`, \WC_Object_Query`, or use `DataStore` directly. * * @return array */ protected function get_default_query_vars() { wc_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '9.3.0', '`GenericQuery`, `\WC_Object_Query`, or direct `DataStore` use' ); return array(); } /** * Get categories data based on the current query vars. * * @deprecated 9.3.0 Categories\Query class is deprecated. Please use `GenericQuery`, \WC_Object_Query`, or use `DataStore` directly. * * @return array */ public function get_data() { wc_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '9.3.0', '`GenericQuery`, `\WC_Object_Query`, or direct `DataStore` use' ); $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 ); } }