Free Shipping and other payment
-
Hi there,
when I have my free shipping, there comes a dropdown where I can choose if I want to have free shipping or to pay for it.I already used this code:
// Hide standard shipping option when free shipping is available
add_filter( ‘woocommerce_available_shipping_methods’, ‘hide_standard_shipping_when_free_is_available’ , 10, 1 );/**
* Hide Standard Shipping option when free shipping is available
*
* @param array $available_methods
*/
function hide_standard_shipping_when_free_is_available( $available_methods ) {if( isset( $available_methods[‘free_shipping’] ) AND isset( $available_methods[‘flat_rate’] ) ) {
// remove standard shipping option
unset( $available_methods[‘flat_rate’] );
}return $available_methods;
}but it still doesn’t work. Any ideas?
- The topic ‘Free Shipping and other payment’ is closed to new replies.