Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for free shipping handling of minimum order rule #39155

Merged
merged 5 commits into from Jul 19, 2023

Conversation

anastas10s-afk
Copy link
Contributor

@anastas10s-afk anastas10s-afk commented Jul 8, 2023

Changes proposed in this Pull Request:

Fixes the calculation from when Apply minimum order rule before coupon discount is active and prices are entered inclusive of tax and displayed that way in cart and checkout, free shipping is no longer available (based on the minimum order amount including tax), as it uses the pre-tax amount when a coupon is applied.

Closes #28752 .

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to WooCommerce > Settings > Tax
  2. Set Prices entered with tax to Yes, I will enter prices inclusive of tax
  3. Set Display prices during cart and checkout to Including tax
  4. Add a tax rate
  5. Add Free shipping with a required minimum order amount
  6. Check the Apply minimum order rule before coupon discount option for Free shipping
  7. Add a physical product with a price inclusive of tax is above the minimum order amount, but the pre-tax amount is below the minimum order amount
  8. Add a coupon that doesn't include free shipping
  9. Add the product to the cart
  10. Confirm free shipping is available
  11. Add the coupon
  12. Confirm free shipping is still available

Changes when coupons added and prices are entered and displayed inclusive of tax
@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution labels Jul 8, 2023
@woocommercebot woocommercebot requested review from a team and coreymckrill and removed request for a team July 8, 2023 16:09
@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2023

Hi ,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Collaborator

@coreymckrill coreymckrill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @anastas10s-afk !

👍 Tests well, although I think in the testing instructions, the last line would be clearer as "Confirm free shipping is still available".

@coreymckrill coreymckrill merged commit 00073c0 into woocommerce:trunk Jul 19, 2023
18 of 19 checks passed
@github-actions github-actions bot added this to the 8.1.0 milestone Jul 19, 2023
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Jul 19, 2023
@alopezari alopezari added needs: analysis Indicates if the PR requires a PR testing scrub session. and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jul 19, 2023
@nigeljamesstevenson nigeljamesstevenson added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Jul 19, 2023
@tammullen tammullen added the metric: revised testing instructions A tracking label for cases when the testing instructions were revised. label Jul 27, 2023
@anastas10s-afk
Copy link
Contributor Author

Thank you so much, @coreymckrill !
Plus, excellent remark on how the last line could be worded (It now reads as you suggested).

@fvdbgit
Copy link

fvdbgit commented Aug 27, 2023

@anastas10s-afk @coreymckrill : the changes do not work anymore with WooCommerce v8.0.2. In v8.0.2, when you add the coupon, the free shipping is not available anymore (on final step 12). Could you please check what happens? Thank you very much.

@coreymckrill
Copy link
Collaborator

Hi @fvdbgit, this fix is merged into trunk, but it hasn't been released yet. It should go out in the 8.1.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
metric: revised testing instructions A tracking label for cases when the testing instructions were revised. needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. needs: internal testing Indicates if the PR requires further testing conducted by Solaris plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution
Projects
None yet
6 participants