Categories
4 weeks ago
Coupons
4 weeks ago
Customers
2 months ago
Downloads
1 year ago
Export
3 years ago
Import
3 years ago
Orders
4 weeks ago
PerformanceIndicators
9 months ago
Products
4 weeks ago
Revenue
3 months ago
Stock
4 months ago
Taxes
4 weeks ago
Variations
4 weeks ago
Cache.php
4 years ago
Controller.php
11 months ago
DataStore.php
4 weeks ago
DataStoreInterface.php
4 years ago
ExportableInterface.php
4 years ago
ExportableTraits.php
4 years ago
FilteredGetDataTrait.php
1 year ago
GenericController.php
1 year ago
GenericQuery.php
1 year ago
GenericStatsController.php
1 year ago
OrderAwareControllerTrait.php
1 year ago
ParameterException.php
4 years ago
Query.php
1 year ago
Segmenter.php
1 year ago
SqlQuery.php
3 years ago
StatsDataStoreTrait.php
1 year ago
TimeInterval.php
2 years ago
Query.php
42 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Class for parameter-based Reports querying |
| 4 | */ |
| 5 | |
| 6 | namespace Automattic\WooCommerce\Admin\API\Reports; |
| 7 | |
| 8 | defined( 'ABSPATH' ) || exit; |
| 9 | |
| 10 | /** |
| 11 | * Admin\API\Reports\Query |
| 12 | * |
| 13 | * @deprecated 9.3.0 Query class is deprecated. Please use `GenericQuery`, \WC_Object_Query`, or use `DataStore` directly. |
| 14 | */ |
| 15 | abstract class Query extends \WC_Object_Query { |
| 16 | |
| 17 | /** |
| 18 | * Create a new query. |
| 19 | * |
| 20 | * @deprecated 9.3.0 Query class is deprecated. Please use `GenericQuery`, \WC_Object_Query`, or use `DataStore` directly. |
| 21 | * |
| 22 | * @param array $args Criteria to query on in a format similar to WP_Query. |
| 23 | */ |
| 24 | public function __construct( $args = array() ) { |
| 25 | wc_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '9.3.0', '`GenericQuery`, `\WC_Object_Query`, or direct `DataStore` use' ); |
| 26 | parent::__construct( $args ); |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * Get report data matching the current query vars. |
| 31 | * |
| 32 | * @deprecated 9.3.0 Query class is deprecated. Please use `GenericQuery`, \WC_Object_Query`, or use `DataStore` directly. |
| 33 | * |
| 34 | * @return array|object of WC_Product objects |
| 35 | */ |
| 36 | public function get_data() { |
| 37 | wc_deprecated_function( __CLASS__ . '::' . __FUNCTION__, '9.3.0', '`GenericQuery`, `\WC_Object_Query`, or direct `DataStore` use' ); |
| 38 | /* translators: %s: Method name */ |
| 39 | return new \WP_Error( 'invalid-method', sprintf( __( "Method '%s' not implemented. Must be overridden in subclass.", 'woocommerce' ), __METHOD__ ), array( 'status' => 405 ) ); |
| 40 | } |
| 41 | } |
| 42 |