Content of the page

Flexible Product Fields Pro (by wpdesk.net)


Content of the article

Plugin: https://www.wpdesk.net/products/flexible-product-fields-pro-woocommerce/

  • in file \wp-content\plugins\flexible-product-fields\classes\fpf-product-fields.php add next code:
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $price = $WOOCS->woocs_exchange_value(floatval($price));
        }
    }

  • in file \wp-content\plugins\flexible-product-fields\classes\fpf-cart.php add next code:
    $cost = $cart_item['data']->get_price() + $extra_cost;
    if (class_exists('WOOCS')) {
        global $WOOCS;
        if ($WOOCS->is_multiple_allowed) {
            $currencies = $WOOCS->get_currencies();
            $conversion_rate = $currencies[$WOOCS->current_currency]['rate'];
            $cost = $cost / $conversion_rate;
        }
    }
    $cart_item['data']->set_price($cost);
    

  • Please  do test!

 

Faster WordPress HostingWPBE - WordPress Posts Bulk Editor Professional