Created
January 21, 2026 08:32
-
-
Save dwanjuki/ce7a8c662638bd00ec8ef8cbf9f7d985 to your computer and use it in GitHub Desktop.
Set language / locale for Stripe Checkout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php // copy from below. | |
| /** | |
| * Set Stripe Checkout language/locale. | |
| * | |
| * Possible locale values: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-locale | |
| * | |
| * You can add this recipe to your site by creating a custom plugin | |
| * or using the Code Snippets plugin available for free in the WordPress repository. | |
| * Read this companion article for step-by-step directions on either method. | |
| * https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
| */ | |
| function my_pmpro_stripe_checkout_session_parameters_locale( $checkout_session_params, $morder ) { | |
| $checkout_session_params['locale'] = 'es-419'; | |
| return $checkout_session_params; | |
| } | |
| add_filter( 'pmpro_stripe_checkout_session_parameters', 'my_pmpro_stripe_checkout_session_parameters_locale', 10, 2 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment