The documentation for WooCommerce Blocks has moved to the WooCommerce monorepo.
Please refer to the documentation in the new location as the files in this repository will no longer be updated and the repository will be archived.
To conduct these tests, please set up the following coupons:
generalCoupon
: A general-purpose couponexpiredCoupon
: An expired couponemailRestrictedCoupon
: An email-limited coupon, applicable to*@automattic.com
emailsthresholdCoupon
: A cart condition coupon, applicable to carts above a certain threshold (e.g., $200)individualCoupon
: An individually used couponfreeShippingCoupon
: A free shipping coupon
To execute the following test cases, you will need to toggle the coupon functionality. You can enable or disable coupons via WP Admin » WooCommerce » Settings » General » Enable coupons
:
- Verify that the 'Add Coupon' section is not visible in your cart, checkout, and in the editor.
- Ensure the ability to apply coupons in both Cart and Checkout blocks.
- A valid coupon,
generalCoupon
, should accurately reduce your totals. - An expired coupon,
expiredCoupon
, should generate an error upon application. - Attempting to apply an invalid coupon should generate an error message.
- An email-limited coupon,
emailRestrictedCoupon
, should be applicable to your cart.- If the email is correct, checkout should proceed without errors.
- If the email is incorrect, an error message should appear, and the coupon should be removed from your cart.
- A condition coupon,
thresholdCoupon
, should only be applicable once the stipulated condition is met.- If a condition coupon is added and subsequently the condition is unmet, it should be removed from your cart with a corresponding error message.
- A valid coupon,
generalCoupon
, when followed by an individually used coupon,individualCoupon
, should override the first one. - An individually used coupon,
individualCoupon
, when followed by an attempt to add another coupon, should generate an error message. - A free shipping coupon,
freeShippingCoupon
, should display the free shipping method you previously configured.