-
Notifications
You must be signed in to change notification settings - Fork 211
Cache enabled payment method IDs for non-admin pages #4183
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
Conversation
changelog.txt
Outdated
@@ -43,6 +43,7 @@ | |||
* Tweak - Add save payment method parameter to update intent call for non-deferred intent payment methods. | |||
* Dev - Fetch Stripe settings with Stripe configuration API. | |||
* Add - Hook up payment methods configuration. | |||
* Dev - Cache enabled payment method IDs |
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.
I think we should explain the change better here 👀
@@ -84,6 +95,7 @@ public static function get_upe_enabled_payment_method_ids() { | |||
} | |||
} | |||
|
|||
set_transient( self::UPE_ENABLED_PAYMENT_METHOD_IDS_TRANSIENT_KEY, $enabled_payment_method_ids, DAY_IN_SECONDS ); |
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.
Maybe we should include a cache bust function when the merchant changes the available payment methods.
Thanks for working on this! I could not find any indication on my debug.log file related to the cache setting/querying 🤔 . Maybe some testing steps are missing from the instructions? |
…to add/hook-up-enabled-payment-methods
…to add/hook-up-enabled-payment-methods
…to add/hook-up-enabled-payment-methods
…to add/hook-up-enabled-payment-methods
…bled-payment-methods
📈 PHP Unit Code Coverage Report
|
Closing in favor of #4241 |
Fixes #4182
Changes proposed in this Pull Request:
This PR caches enabled payment method IDs. Frontend uses the cache if it’s set, and the backend updates the cache.
Testing instructions
dev/cache-enabled-payment-methods-test
Changelog entry
Changelog Entry Comment
Comment
Post merge