mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Send the locale if appropriate setting is selected
This commit is contained in:
parent
19b189401d
commit
d6b6ed3ed0
2 changed files with 2 additions and 2 deletions
|
@ -982,7 +982,7 @@ class SmartButton implements SmartButtonInterface {
|
|||
}
|
||||
|
||||
if ( $this->settings->has( 'smart_button_locale_override' ) && $this->settings->get( 'smart_button_locale_override' ) ) {
|
||||
$params['lc'] = $this->locale;
|
||||
$params['locale'] = $this->locale;
|
||||
}
|
||||
|
||||
$smart_button_url = add_query_arg( $params, 'https://www.paypal.com/sdk/js' );
|
||||
|
|
|
@ -1395,7 +1395,7 @@ return array(
|
|||
$locale = get_user_locale();
|
||||
$wp_paypal_locale_map = $container->get( 'wcgateway.wp-paypal-locales-map' );
|
||||
|
||||
$locale = $wp_paypal_locale_map[ $locale ] ?: $locale;
|
||||
$locale = $wp_paypal_locale_map[ $locale ] ?? $locale;
|
||||
|
||||
return apply_filters( 'woocommerce_paypal_payments_button_locale_override', $locale );
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue