WOOCS - WooCommerce Currency Switcher

YITH WooCommerce Subscription Premium

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

  • in file wp-content\plugins\yith-woocommerce-subscription-premium\includes\class.ywsbs-subscription-cart.php add next code:
    $rate = 1;
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
            }
        }
    }

  • to the same file add next code:
    $rate = 1;
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
            }
        }
    }

  • to the same file add next code:
    $rate = 1;
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
            }
        }
    }

  • in file wp-content\plugins\yith-woocommerce-subscription-premium\includes\class.ywsbs-subscription-synchronization.php add next code:
    $rate = 1;
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
            }
        }
    }

  • add to file plugins\yith-woocommerce-subscription-premium\templates\cart\ywsbs-recurring-totals.php next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        $recurring_price = $WOOCS->woocs_exchange_value(floatval($recurring_price));
    }