mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Revert to get_woocommerce_currency
and use get_option
as fallback
This commit is contained in:
parent
c122e57827
commit
3c77f98ef2
1 changed files with 6 additions and 2 deletions
|
@ -327,12 +327,16 @@ return array(
|
|||
},
|
||||
|
||||
'api.shop.currency' => static function ( ContainerInterface $container ) : string {
|
||||
// We use option instead of get_woocommerce_currency
|
||||
// because it will not be overridden by currency switching plugins.
|
||||
$currency = get_woocommerce_currency();
|
||||
if ( $currency ) {
|
||||
return $currency;
|
||||
}
|
||||
|
||||
$currency = get_option( 'woocommerce_currency' );
|
||||
if ( ! $currency ) {
|
||||
return 'NO_CURRENCY'; // Unlikely to happen.
|
||||
}
|
||||
|
||||
return $currency;
|
||||
},
|
||||
'api.shop.country' => static function ( ContainerInterface $container ) : string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue