Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
WC_API_Coupons::query_coupons( array $args )
Helper method to get coupon post objects
Description Description
Parameters Parameters
- $args
-
(Required) request arguments for filtering query
Return Return
(WP_Query)
Source Source
File: includes/legacy/api/v2/class-wc-api-coupons.php
private function query_coupons( $args ) { // set base query arguments $query_args = array( 'fields' => 'ids', 'post_type' => 'shop_coupon', 'post_status' => 'publish', ); $query_args = $this->merge_query_args( $query_args, $args ); return new WP_Query( $query_args ); }
Changelog Changelog
Version | Description |
---|---|
2.1 | Introduced. |