Open
Description
Describe the bug
When using the test stripe gateway (and probably any other for that matter) and then performing a checkout mutation the WC Session notices are not returned with a failed payment. If you then replace the details with a successful payment test card the failure notices from the previous mutation are returned.
To Reproduce
Steps to reproduce the behavior:
- Go to the checkout on the frontend
- Enter test card details for a failed transaction
- Checkout mutation fails but does not return notices
- Enter test card details for a successful transaction and attempt payment again
- The payment is not processed and the notices from the previous failed transaction are returned
- Attempt payment again and it is successful
Expected behavior
Session notices are returned and cleared on every checkout mutation
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Version: Latest
Plugin Versions
- WooGraphQL Version: 0.11.2
- WPGraphQL Version: 1.11.2
- WordPress Version: 6.1
- WooCommerce Version: 7.0.0
Additional context
In order to fix this bug I ended up creating a REST API endpoint that calls the checkout mutation and then before returning the result to the frontend adds the notices and clears them from the session.