57 lines
2.7 KiB
Markdown
57 lines
2.7 KiB
Markdown
# Testing notes and ZIP for release 11.4.9
|
|
|
|
Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/13428260/woocommerce-gutenberg-products-block.zip)
|
|
|
|
## WooCommerce Core
|
|
|
|
### Bug Fixes
|
|
|
|
#### Enhance validation for limited use coupons and guest users. ([11860](https://github.com/woocommerce/woocommerce-blocks/pull/11860))
|
|
|
|
##### From logged in to logged out
|
|
|
|
1. Create a new coupon and limit its usage to 1 per customer.
|
|
2. Logged in, with an email you remember, place an order using that coupon, it should pass.
|
|
3. Logged out, using the same email, try placing an order with that coupon, you should get a top level error "coupon_name" was removed from the cart. Coupon usage limit has been reached.".
|
|
|
|
##### User email vs billing email
|
|
|
|
1. Create a new coupon and limit its usage to 1 per customer.
|
|
2. Logged in, with an user email you remember, place an order using that coupon, and a different billing email. It should pass.
|
|
3. Logged out, using the same user email (not the billing email), try placing an order with that coupon, you should get a top level error "coupon_name" was removed from the cart. Coupon usage limit has been reached.".
|
|
|
|
##### From logged out to logged in
|
|
|
|
1. Create a new coupon and limit its usage to 1 per customer.
|
|
4. Logged out, use the coupon with an email you remember, that email should belong to an existing user.
|
|
5. You should be able to place the order fine.
|
|
6. Logged in with the user that own that email.
|
|
7. Go to checkout, add the coupon, using the same email, try to place the order.
|
|
8. You should get a top level error.
|
|
9. Change your billing email to something else, add the coupon again.
|
|
10. Try to place the order, you should get an error.
|
|
|
|
##### General regression testing
|
|
|
|
1. Create a new coupon and limit its usage to 1 per customer.
|
|
2. Logged in, with an email you remember, place an order using that coupon, it should pass.
|
|
3. Logged in again, back to checkout, change your email, and try adding the coupon, you should get an inline error that you can't use the coupon.
|
|
|
|
## Testing notes for the development team
|
|
|
|
### Bug fixes
|
|
|
|
#### Fixed params passed to woocommerce_before_thankyou for block checkout. This should be an order ID, not an order object. ([11862](https://github.com/woocommerce/woocommerce-blocks/pull/11862))
|
|
|
|
1. Implement a function that expects an integer for the order ID, attached to the woocommerce_before_thankyou hook.
|
|
|
|
```php
|
|
function test_function_11851( int $order_id ): void {
|
|
printf( 'Hello, this is order %d', $order_id );
|
|
}
|
|
add_action( 'woocommerce_before_thankyou', 'test_function_11851' );
|
|
```
|
|
|
|
2. Place an order on the WooCommerce store.
|
|
3. Thanks page should show without errors. Should see `Hello, this is order X`
|