Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'woocommerce_package_rates', 'hide_frate_shipping_when_free_is_available', 10, 2 );
- function hide_frate_shipping_when_free_is_available( $rates, $package ) {
- if ( isset( $rates['free_shipping'] ) ) {
- unset( $rates['flat_rate'] );
- }
- return $rates;
- }
Add Comment
Please, Sign In to add comment