You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you set “Language In Payment Window” to “Detect Automatically” the payment window is ALWAYS shown in English. And I think it’s a bug in the plugin:
Note that “Detect automatically” is defined as the empty string in ReepayCheckout.php:297 '' => __( 'Detect Automatically', 'reepay-checkout-gateway' )
Further note that the language setting is loaded in ReepayCheckout.php:76 $this->language = $this->settings['language'] ?: $this->language;
and keep in mind that the short-versioned ternary operator ?: interprets the empty string (== “Detect Automatically”) as false and will therefore not assign the empty string to $this->language. That is $this->language will be initialized with its current value, which is defined in ReepayGateway.php:94 public $language = 'en_US';
Due to this mistake, the method get_language is never actually executed and therefore neither is get_locale. Therefore the settings “Detect automatically” is effectively ignored and the payment window is shown in en_US, no matter the current WordPress locale.
This bug has existed since at least v1.7.0.
The text was updated successfully, but these errors were encountered:
If you set “Language In Payment Window” to “Detect Automatically” the payment window is ALWAYS shown in English. And I think it’s a bug in the plugin:
Note that “Detect automatically” is defined as the empty string in ReepayCheckout.php:297
'' => __( 'Detect Automatically', 'reepay-checkout-gateway' )
Further note that the language setting is loaded in ReepayCheckout.php:76
$this->language = $this->settings['language'] ?: $this->language;
and keep in mind that the short-versioned ternary operator
?:
interprets the empty string (== “Detect Automatically”) asfalse
and will therefore not assign the empty string to$this->language
. That is$this->language
will be initialized with its current value, which is defined in ReepayGateway.php:94public $language = 'en_US';
Due to this mistake, the method
get_language
is never actually executed and therefore neither isget_locale
. Therefore the settings “Detect automatically” is effectively ignored and the payment window is shown inen_US
, no matter the current WordPress locale.This bug has existed since at least v1.7.0.
The text was updated successfully, but these errors were encountered: