Description
The problem is that we need the coupon code to calculate taxes, so we etch the price by ID and coupon code. If the coupon code does not exist, then the price is not fetched correctly. It causes some problems - the checkout was not loading - when the coupon, for example, has been removed and the user comes from the website.
Now, we fetch the promotional code before so we can check if it exists. If so, then we use the fetched coupon data to fetch the price with that coupon.
Related Issues
Related Pull Requests
Checklist
- Changes have been tested locally.
- Unit tests have been written or updated as necessary.
- The code adheres to the repository's coding standards.
- Relevant documentation has been added or updated.
- No new warnings or errors have been introduced.
- SonarCloud issues have been reviewed and addressed.
- QA Passed