Guest User

Untitled

a guest
Oct 4th, 2021
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. add_action('woocommerce_checkout_update_order_review', function($data) {
  2. global $WOOCS;
  3.  
  4. if (is_string($data)) {
  5. parse_str($data, $data);
  6. }
  7. $_currency = $WOOCS->get_currency_by_country($data['shipping_country']);
  8.  
  9. if (!empty($_currency)) {
  10. $WOOCS->set_currency($_currency);
  11. $_GET['currency']=$_currency;
  12. }
  13. }, 9999);
Advertisement
Add Comment
Please, Sign In to add comment