Coupon
For loop type woo_coupon
, here are the query parameters and fields.
Query parameters
post_type
-type
-
Fields
amount
- Get coupon amountcode
- Get coupon codedate_created
- Get date_createddate_expires
- Get coupon expiration datedate_modified
- Get date_modifieddescription
- Get coupon descriptiondiscount_type
- Get discount typeemail_restrictions
- Get emails to check customer usage restrictionsexclude_sale_items
- If this coupon should exclude items on saleexcluded_product_categories
- Get product categories this coupon cannot not apply to. Returns a Loopexcluded_products
- Get product IDs that this coupon should not apply to. Returns a Loopfree_shipping
- If this coupon grants free shipping or notid
- IDindividual_use
- Get the "individual use" checkbox statusis_valid
- Check if a coupon is valid for the cartlimit_usage_to_x_items
- Usage limited to certain amount of itemsmaximum_amount
- Get maximum spend amountminimum_amount
- Get minimum spend amountproduct_categories
- Get product categories this coupon can apply to. Returns a Loopproducts
- Get product IDs this coupon can apply to. Returns a Loopusage_count
- Get coupon usage countusage_limit
- Get coupon usage limitusage_limit_per_user
- Get coupon usage limit per customer (for a single customer)used_by
- Get records of all users who have used the current coupon. Returns a Loopvirtual
- If the filter is added through the woocommerce_get_shop_coupon_data filter, it's virtual and not in the DB