Closed hmimthiaz closed 2 years ago
Woocommerce Currency for UAE is AED and fedex backend returns the currency value in DHS. We spoke to Fedex and they are not able to give a solution. So I made a quick hack on the plugin and please check if it is worth including to your next update.
File: php-fedex-api-wrapper/src/FedEx/RateService/ComplexType/Money.php
Change:
public function setCurrency($currency) { + if (defined('OVERRIDE_FEDEX_MONEY_DHS_TO_AED')) { + if ($currency == 'DHS') { + $currency = 'AED'; + } + } $this->values['Currency'] = $currency; return $this; }
This will work only if the constant is defined else it will work as expected.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
Woocommerce Currency for UAE is AED and fedex backend returns the currency value in DHS. We spoke to Fedex and they are not able to give a solution. So I made a quick hack on the plugin and please check if it is worth including to your next update.
File: php-fedex-api-wrapper/src/FedEx/RateService/ComplexType/Money.php
Change:
This will work only if the constant is defined else it will work as expected.