WOOCS - WooCommerce Currency Switcher

YITH Donations for WooCommerce Premium 1.0.14

Plugin link: https://yithemes.com/themes/plugins/yith-donations-for-woocommerce/

  • in file \wp-content\plugins\yith-donations-for-woocommerce-premium\includes\classes\class.yith-woocommerce-donations-premium.php add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->current_currency != $WOOCS->default_currency) {
            $currencies = $WOOCS->get_currencies();
            $amount = $amount / $currencies[$WOOCS->current_currency]['rate'];
        }
    }

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