A coupon update can fail even when your intended final minimum and maximum spend are valid. In WooCommerce 11.2, the minimum and maximum are validated against each other, so code that changes them through separate setter calls can encounter an invalid intermediate state. Inspect the current pair, intended pair and actual write sequence before changing checkout restrictions.
The WooCommerce developer advisory documents WC_Data_Exception from an invalid minimum and HTTP 400 responses from the wc/v2 and wc/v3 coupon endpoints for an invalid pair. It recommends setting both properties together through set_props() in PHP integrations.
Separate Saving the Coupon From Applying It
First determine where the failure happens. An import job reporting an error while updating a coupon is not the same as a shopper being ineligible for a successfully saved coupon. The latter belongs in the checkout coupon restrictions guide.
Read the existing coupon by its stable ID. Record minimum spend, maximum spend and the other properties your job intends to preserve. Do not identify the record only by a title in a spreadsheet if your import can create duplicates.
Keep a sanitized copy of the failed request and response. Retain the error code and message, but remove API credentials, customer restrictions and unpublished promotional codes before sharing them.
Look for an Invalid Intermediate Pair
Consider a synthetic coupon changing from a 20 minimum and 50 maximum to an 80 minimum and 120 maximum. Setting the minimum to 80 while the stored maximum remains 50 creates a conflict. The intended final range is not the value being validated at that moment.
For a REST update, send the related values in the same intended update and inspect the complete response. The following is an illustrative payload, not a command against a live store:
{
"minimum_amount": "80.00",
"maximum_amount": "120.00"
}
For PHP integrations, use the documented grouped-property approach and handle the returned validation result according to the installed WooCommerce API. Do not swallow exceptions or save after an error merely to keep an import moving.
Current state: Read the existing coupon ID. Write: Submit the intended pair together. Errors: Do not retry invalid data blindly. Boundaries: Verify saved range and carts. Explanatory checklist, not a customer test result.
Validate the Saved Result and the Boundary Carts
Test on staging with a disposable coupon. Read it back after the write and compare the complete intended pair. Then test carts below the minimum, at the boundaries, within the range and above the maximum. Keep taxes, shipping and other discount settings fixed and document how the store evaluates eligible spend.
Include transitions in both directions: raising a range and lowering it. Test malformed values and a genuinely inverted range as rejected inputs. A job that works only for the first synthetic example is not ready for a bulk coupon update.
Should the Integration Retry Every HTTP 400?
No. Repeating an unchanged invalid pair will not repair validation. Separate data errors from transient failures, retain the failed record for review, and avoid a loop that repeatedly creates or overwrites coupons.
Before deploying a corrected importer, preview affected IDs and keep a recovery export. Request help with a WooCommerce integration failure when the write order or error handling is hidden inside a custom plugin.
References reviewed October 15, 2026. Examples are explanatory, not customer test results.