- This topic has 2 replies, 2 voices, and was last updated 2 years, 4 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Set “locale” for SCA Stripe checkout page
Hello. I try to set the locale of Stripe checkout page, but unfortunately can not find where is set this locale to “auto”. I want to have this set to my language code because browser’s automatic language do not work everytime and i do not want to have the english as default.
I found in the views > payments > payment-gateway > stripe_sca_button_shortcode_view.php on line 100 and 246 that there is set parameter “payment_method_types” which is the Stripe checkout parameter, tried to put there new parameter locale: ‘de’, but it does not work.
I tried this:
‘swpm_button_id’: <?php echo esc_js( $button_id ); ?>,
‘payment_method_types’: ‘<?php echo esc_js( $payment_method_types ); ?>’,
‘locale’: ‘de’,
Can you please help me with this, where can i change in the code this locale?
Thank you
If anybody is curious where you can set this, it is in “wp-plugins/simple-membership/ipn/swpm-stripe-sca-checkout-session-create.php” i added above the line 169 this: ‘locale’ => ‘de’, and it works.
I think if you have one-off payment you should add this above the line 153.
Thank you. It’s probably better to use the following filter hook to override the checkout session options instead of directly modifying the plugin’s code:
swpm_stripe_sca_session_opts
The following mentioned section has example of how to use this filter hook to override the Stripe checkout session options:
https://simple-membership-plugin.com/simple-membership-filter-hook-reference/#swpmstripescasessionopts