WooCommerce · Arazzo Workflow
WooCommerce Upsert Coupon by Code
Version 1.0.0
Find a coupon by its code and create it only if it does not already exist.
Provider
Workflows
upsert-coupon-by-code
Upsert a coupon keyed on its code, creating it only when missing.
Searches existing coupons by code and either reads the matched coupon or creates a new one when no match exists.
1
findCoupon
listCoupons
Search existing coupons for one matching the supplied code, returning at most one result.
2
getExisting
getCoupon
Read the matched coupon to confirm its current discount settings.
3
createNew
createCoupon
Create a new coupon with the supplied code and discount when no existing coupon matched.