WOOCS - WooCommerce Currency Switcher

YITH WooCommerce Gift Cards

Plugin URL: https://yithemes.com/themes/plugins/yith-woocommerce-gift-cards/

  • to your current child wp theme file functions.php add next code:
    add_filter('yith_ywgc_set_cart_item_price', function ($amount, $values) {
        if (class_exists('WOOCS')) {
            global $WOOCS;
            $curr = $WOOCS->current_currency;
            if ($curr != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $amount = $WOOCS->back_convert($amount, $currencies[$curr]['rate']);
            }
        }
        return $amount;
    }, 99, 2);