mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Do not use get_woocommerce_currency
This commit is contained in:
parent
21aa8980d6
commit
a432e39436
2 changed files with 7 additions and 2 deletions
|
@ -322,7 +322,13 @@ return array(
|
|||
},
|
||||
|
||||
'api.shop.currency' => static function ( ContainerInterface $container ) : string {
|
||||
return get_woocommerce_currency();
|
||||
// We use option instead of get_woocommerce_currency
|
||||
// because it will not be overridden by currency switching plugins.
|
||||
$currency = get_option( 'woocommerce_currency' );
|
||||
if ( ! $currency ) {
|
||||
return 'NO_CURRENCY'; // Unlikely to happen.
|
||||
}
|
||||
return $currency;
|
||||
},
|
||||
'api.shop.country' => static function ( ContainerInterface $container ) : string {
|
||||
$location = wc_get_base_location();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue