Setting Free Shipping with Minimum Order Amount – 2
-
Hello
Two days ago I asked on this subject, I got an excellent answer.
Now I have continued question and nobody sees it, So I open a new subject.To my first question, I got the code added to functions.php
add_filter( 'woocommerce_package_rates', 'my_hide_shipping_when_free_is_available', 100 ); function my_hide_shipping_when_free_is_available( $rates ) { $free = array(); foreach ( $rates as $rate_id => $rate ) { if ( 'free_shipping' === $rate->method_id ) { $free[ $rate_id ] = $rate; break; } } return ! empty( $free ) ? $free : $rates; }
It works well, Thanks.
————————–
The continued question:
I would like to add also the Local Pickup.
The problem is that when the invitation is greater than the Minimum Order Amount The Local Pickup gone.
Should be:
From under the Minimum Order Amount – fixed amount + Local Pickup
From about the Minimum Order Amount – Free Shipping + Local PickupHow do I add this condition to this function?
(If you do not understand me, you can look in the original conversation)
Thanks
- The topic ‘Setting Free Shipping with Minimum Order Amount – 2’ is closed to new replies.