M
M
madc0de2015-12-04 17:15:33
WordPress
madc0de, 2015-12-04 17:15:33

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;
}

woocommerce guru helppp+++

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question