Answer the question
In order to leave comments, you need to log in
How to change price on checkout page in woocommerce via ajax?
If this code is written in function.php, then when the page is loaded, the entire "total" price will change to the specified one.
How can I change the price on ajax request? And then when you switch to payment, the same price remained.
add_filter('woocommerce_get_price', 'cmw_custom_price', 100, 2);
function cmw_custom_price($price, $info){
$price = $price*50;
return $price;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question