Content of the page

WooCommerce Extra Product Options (by themecomplete)


Content of the article

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

//And add this code in functions.php of your current wp theme:
add_filter('woocs_fixed_raw_woocommerce_price', 'compatibility_woo_tm_extr', 10, 3);

function compatibility_woo_tm_extr($fix_price, $product, $price) {
    global $WOOCS;
    //var_dump($price);
    if (is_cart() OR is_checkout()) {
        $new_price = $WOOCS->woocs_exchange_value($price - $fix_price);
        $fix_price += $new_price;

        return $fix_price;
    }
    return $fix_price;
}

ATTENTION: from v.4.5.4 this hook inbuilt into WooCommerce Extra Product Options so this article is for old versions of this plugin

 

Faster WordPress Hosting