Woocommerce shipping changing the default
-
Hi,
I’m trying to change our default shipping selection so that our 48-hour track option is always selected as default.
I’ve tried –
function reset_default_shipping_method( $method, $available_methods ) {
$default_method = ‘shipping_method_0_flat_rate3’; // service name which will select default
if( array_key_exists($method, $available_methods ) )
return $default_method;
else
return $method;
}
add_filter(‘woocommerce_shipping_chosen_method’, ‘reset_default_shipping_method’, 10, 2);But can not get it to work can anyone help?
The page I need help with: [log in to see the link]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Woocommerce shipping changing the default’ is closed to new replies.