WOOCS - WooCommerce Currency Switcher Professional


WooCommerce Extra Product Options (by themecomplete)

Plugin link: https://codecanyon.net/item/woocommerce-extra-product-options/7908619

  • In file wp-content\plugins\woocommerce-tm-extra-product-options\include\classes add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed AND $price1) {
            $currrent = $WOOCS->current_currency;
            if ($currrent != $WOOCS->default_currency) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$currrent]['rate'];
                $price1 = $price1 / $rate;
            }
        }
    }
    

  • ┬áIn file wp-content\plugins\woocommerce-tm-extra-product-options\assets\js\tm-epo.js add next code:
    if (typeof woocs_current_currency != 'undefined') {
        data.symbol = woocs_current_currency['symbol'];
        data.precision = woocs_current_currency['decimals'];
    }
    

  • And check option in this plugin:
  • To file wp-content\plugins\woocommerce-tm-extra-product-options\include\classes\class-tm-epo-cart.php add next code:
    if (class_exists('WOOCS') AND isset($cart_item['tm_epo_product_original_price']) AND $cart_item['tm_epo_product_original_price']) {
        global $WOOCS;
        $cart_item['tm_epo_product_original_price'] = $WOOCS->woocs_exchange_value(floatval($cart_item['tm_epo_product_original_price']));
    }
    

  • On the same file add next code:
    if (class_exists('WOOCS') AND isset($cart_item['tm_epo_product_original_price']) AND $cart_item['tm_epo_product_original_price']) {
        global $WOOCS;
        $cart_item['tm_epo_product_original_price'] = $WOOCS->woocs_exchange_value(floatval($cart_item['tm_epo_product_original_price']));
    }