-
Notifications
You must be signed in to change notification settings - Fork 67
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
Prevent duplicate queries from PRB on checkout #8803
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: 0 B Total Size: 1.25 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.
Tests well for me - I no longer see the query happening on the checkout and the payment method title appears as it should in wp-admin.
Fixes #8716
Changes proposed in this Pull Request
This PR adds a check to ensure we're in the admin when filtering the PRB gateway title. Additionally, it returns early if the gateway is not
woocommerce_payments
.WC_Payments_Payment_Request_Button_Handler::filter_gateway_title()
was intended to set the correct payment method title for orders in the admin. Until recently, it was silently running on the checkout page without causing any real issues. Afterget_current_order()
was introduced as a fix for payment method titles on sites using HPOS, duplicate queries were running on the shortcode checkout page.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