plugin development – Woocommerce place order update shipping price
Question
When i place order then i used below action
add_action( 'woocommerce_checkout_create_order', 'change_shipping_price', 20, 1 );
function change_total_on_checking( $order ) {
...
...
}
here i need to set shipping price is zero.
i try below but not working on woocommerce_checkout_create_order
add_filter('woocommerce_package_rates', 'test_overwrite_fedex', 100, 1);
function test_overwrite_fedex($rates)
{
foreach($rates as $rate) {
$rate->cost = floatval(0.00);
$rate->taxes= 0.00;
}
return $rates;
}
how can i solve on woocommerce_checkout_create_order action?
0
1 year
2021-11-23T01:27:32-05:00
2021-11-23T01:27:32-05:00 0 Answers
0 views
0
Leave an answer