-
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
Hide WooPay button on zero total orders without shipping address #9846
Conversation
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: -724 B (0%) Total Size: 1.34 MB
ℹ️ View Unchanged
|
@alefesouza I haven't reviewed the changes yet, but wanted to double-check: |
There are scenarios when it's not showing up and should, and where it is and shouldn't like when there's no billing or shipping to collect, no future payment. Also there's the bug where on hosted checkout for $0 the place order button is disabled. Similarly with ECE I opened an issue because the logic is ignoring sign-up fees for subscriptions and sometimes doesn't show the button. I'll run through an audit later today. |
@malithsen I talked with @pierorocca on Slack and my understanding was to hide the button:
This PR implements that. |
Let's also please check the button shows up when it should as well as part of the testing. I'm also pausing for a moment...what if the shopper wants even free order receipts to be centralized with WooPay? Taking away the button and DC in these scenarios removes that possibility. OK if we did always keep WooPay visible, can we properly transact $0 orders and hide the appropriate sections? |
I'm remembering now I'm the one who made this argument before and felt there's value for WooPay to be a single place for order history. |
Hey guys, let's pause on this change. There is value in keeping WooPay visible even for $0 purchases, regardless of the scenario so that WooPay can be a central store of order history. That being said in addition to the bugs in https://github.com/Automattic/woopay/issues/2224 and #9777, there's missing border when there's no billing and shipping sections. And variable subscriptions with a free trial does not show the correct information if clicking the WooPay button from the product page. 4uzZ5w.mp4Happy to close this out and address these in separate issues. |
Fixes #7895
Changes proposed in this Pull Request
This PR hides the WooPay button on zero total orders, or when buying zero total subscription (0 sign up fee and 0 renewal price) when the cart does not need shipping.
This PR also fixes an issue where other express payment buttons do not get hidden when the order gets to 0 after applying gift cards on classic checkout.
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