-
Notifications
You must be signed in to change notification settings - Fork 69
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
Show ECE buttons on products w/o shipping tax included in price, and improve tests #9954
Conversation
277749f
to
a84ac6e
Compare
tests/unit/express-checkout/test-class-wc-payments-express-checkout-button-handler.php
Show resolved
Hide resolved
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +141 B (0%) Total Size: 1.39 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - The ECE is now displayed on non-shippable products when prices include tax and tax is based on billing address. I left a couple very small comments. Thanks Timur!
includes/express-checkout/class-wc-payments-express-checkout-button-helper.php
Outdated
Show resolved
Hide resolved
includes/express-checkout/class-wc-payments-express-checkout-button-helper.php
Outdated
Show resolved
Hide resolved
…utton-helper.php Co-authored-by: Mike Moore <michael.moore@automattic.com>
…utton-helper.php Co-authored-by: Mike Moore <michael.moore@automattic.com>
Fixes #9921
Changes proposed in this Pull Request
This PR adds the new part to the conditional responsible for filtering out the ece button based on whether it's not shippable and tax is calculated from billing address, which is not present.
we now check for the option selected under WooCommerce -> Settings -> Tax -> Prices entered with tax. If prices entered are inclusive of tax, we will consider that ECE button can be rendered even if does not have billing address.
This PR also refactors some tests in this area, because they were mocking the class that is under test and included tests for two classes under one test suite.
Testing instructions
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge