Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Resolved] Set “locale” for SCA Stripe checkout page

Simple Membership Plugin › Forums › Simple Membership Plugin › Set “locale” for SCA Stripe checkout page

Tagged: checkout, local, stripe

  • This topic has 2 replies, 2 voices, and was last updated 2 years, 4 months ago by admin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 25, 2024 at 6:19 pm #27964
    Sonjoe
    Participant

    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

    May 13, 2024 at 8:59 am #28102
    Sonjoe
    Participant

    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.

    May 15, 2024 at 12:10 am #28104
    admin
    Keymaster

    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

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy