FOX - Currency Switcher Professional for WooCommerce

WooCommerce Product Custom Options Pro 2.0.5 – phoeniixx

Plugin link: http://www.phoeniixx.com/product/woocommerce-product-custom-options/

  • in file \wp-content\plugins\woocommerce-custom-options-pro\classes\class-product-page-options.php add code
    if (class_exists('WOOCS') AND is_array($array_options)) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            foreach ($array_options as $key1 => $op_item1) {
                foreach ($op_item1["options"] as $key2 => $opt) {
                    if ($opt["price"] != 0) {
                        $array_options[$key1]["options"][$key2]["price"] = $WOOCS->woocs_exchange_value(floatval($opt["price"]));
                    }
                }
            }
        }
    }

  • in file \wp-content\plugins\woocommerce-custom-options-pro\classes\class-product-add-to-cart.php add code

    foreach ($cart_item_data['options'] as &$option) {
        if ($option['price'] > 0) {
            global $WOOCS;
            if ($WOOCS->is_multiple_allowed) {
                $currencies = $WOOCS->get_currencies();
                $rate = $currencies[$WOOCS->current_currency]['rate'];
                $option['price'] = $option['price'] / $rate;
            }
        }
    }

    AND

    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $display_price = $WOOCS->woocs_exchange_value(floatval($display_price));
        }
    }