Add WPML compatibility to the settings

This commit is contained in:
Daniel Dudzic 2024-06-03 17:49:00 +02:00
parent 336492d63d
commit 1bc7968e52
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -154,8 +154,10 @@ class Settings implements ContainerInterface {
'woocommerce-paypal-payments' 'woocommerce-paypal-payments'
), ),
); );
foreach ( $defaults as $key => $value ) { foreach ( $defaults as $key => $value ) {
if ( isset( $this->settings[ $key ] ) ) { if ( isset( $this->settings[ $key ] ) ) {
$this->settings[ $key ] = apply_filters( 'woocommerce_paypal_payments_settings_value', $this->settings[ $key ], $key );
continue; continue;
} }
$this->settings[ $key ] = $value; $this->settings[ $key ] = $value;