Hi, yes you can. refer this article
in the bottom of that article you will find a section called Overriding price with WC Fields Factory Plugin.
Regards
Sark
Excellent – will have a proper look when I get back into work on Monday – thanks
Hi
Tried that, but the price isn’t updating – I made the following changes:
if( $field["name"] == "new_logo_upload" ) {
if( $fvalue == "yes" ) {
The option in the field is set to: yes|Yes – I am uploading a new logo +£20 setup fee
The selected option shows up in the cart but the price isn’t affected.
I tried this (from somewhere else) just to see if the theme was letting me use woocommerce_before_calculate_totals
add_action( 'woocommerce_before_calculate_totals', 'dynamic_price' );
function dynamic_price( $woocommerce_cart_object )
{
$new_price = 9.99;
foreach ( $woocommerce_cart_object->cart_contents as $key => $val ) {
$val['data']->price = $new_price;
}
}
and it works fine.
Thanks for your help!