Add filter to change the smart button locale

This commit is contained in:
Narek Zakarian 2023-11-01 19:47:58 +04:00
parent de8e78fde5
commit 7e05be3076
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -1204,6 +1204,7 @@ class SmartButton implements SmartButtonInterface {
}
$locale = $this->settings->has( 'smart_button_language' ) ? $this->settings->get( 'smart_button_language' ) : '';
$locale = (string) apply_filters( 'woocommerce_paypal_payments_smart_buttons_locale', $locale );
if ( $locale ) {
$params['locale'] = $locale;