Merge pull request #2308 from woocommerce/PCP-223-gateway-description-not-translatable-with-wpml

Add WPML compatibility to the settings (223)
This commit is contained in:
Emili Castells 2024-06-14 14:56:54 +02:00 committed by GitHub
commit 3e6be85bb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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