$WOOCS->get_currency_by_country()
global $WOOCS;
//$customer_country = 'ES';
$customer_country = $this->storage->get_val('woocs_user_country')
$currency = $WOOCS->get_currency_by_country($customer_country);
- Vous pouvez obtenir les codes de pays ici : https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes (utilisez le code Alpha-2)
- Utilisez le code suivant si vous voulez obtenir le nom complet du pays par son code :
global $woocommerce; $customer_country = 'ES'; print $woocommerce->countries->countries[$customer_country]; //Will print 'Spain'