WOOCS - WooCommerce Currency Switcher

Woocommerce Custom Fields For Variation (phoeniixx)

The plugin URL: https://wordpress.org/plugins/woo-custom-fields-for-variation/

  •   file  – plugins\woo-custom-fields-for-variation\classes\class-product-add-to-cart.php add  code
    $price = $cart_item_data['data']->get_price();
    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'];
                $price = $price / $rate;
            }
        }
    }