Content of the article

You need to log-in to create request (topic) to the support

Double counted price for variation products.

(new from 01-07-2019)

Hello, my trying to apply this code to revome price range for variation products -
But currency switcher is not working corectly, all prices are double counted . Also i've tried both modes: 'Is multiple allowed' -> as Yes or No. When No is checked, all works correct. Theme - Flatsome. Could you help me please?


What snippet do you use?

PHP Snippet 2: Change WooCommerce Variable Product Price Range $$$-$$$ to “From: $$$min_reg_price $$$min_sale_price”


Paste this  code  here -

if (class_exists('WOOCS')) {
    global $WOOCS;
    if ($WOOCS->is_multiple_allowed) {
        $currencies = $WOOCS->get_currencies();
        $conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
        $min_var_reg_price = $min_var_reg_price / $conversion_rate;
        $min_var_sale_price = $min_var_sale_price / $conversion_rate;
        $max_var_reg_price = $max_var_reg_price / $conversion_rate;
        $max_var_sale_price= $max_var_sale_price / $conversion_rate;