Answer the question
In order to leave comments, you need to log in
Woocomerce what happens during checkout?
You need to change the shipping cost directly in the shopping cart at checkout.
we initially have a shipping cost of 500 rubles, using the js (ymaps api) method we find out the shipping costs and get 1000 rubles.
how can I either change the shipping cost, or intercept (I can’t find the file in which the delivery form is being processed) the data sent for processing and change it there. so that in the formed order for delivery there was a cost of 1000 rubles.
Thank you
Answer the question
In order to leave comments, you need to log in
add_action('woocommerce_new_order', "your_function");
function your_function($order_id){
$order = new WC_Order($order_id);
$order->set_total("1000","shipping");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question