Skip to content

Instantly share code, notes, and snippets.

@thomasplevy
Created April 7, 2020 23:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasplevy/741dc62351954d89d103f39df6116a98 to your computer and use it in GitHub Desktop.
Save thomasplevy/741dc62351954d89d103f39df6116a98 to your computer and use it in GitHub Desktop.
Adjust the language of the LifterLMS Stripe Credit Card Form.
<?php // don't copy this line to your functions.php file!
/**
* Adjust the locale of the Stripe.js credit card form.
*
* @param array $settings Array of settings.
* @return array
*/
function my_llms_stripe_js_locale( $settings ) {
// Adjust the locale of Stripe.js, see https://stripe.com/docs/js/elements_object/create#stripe_elements-options-locale for supported locales.
$settings['elements']['locale'] = 'auto';
return $settings;
}
add_filter( 'llms_stripe_elements_settings', 'my_llms_stripe_js_locale' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment