• we have a local pickup option and I do not want that as default. I need the default shipping method to be specified. How can I default to a specific method returned

    screen shot showing what we are talking about:
    https://share.getcloudapp.com/kpubbq9Y

    the below function is not working and I need the $default_method exact name and confirmation from you that this will work?

    function reset_default_shipping_method( $method, $available_methods ) {
    $default_method = 'shipping_method_0_usps_priority'; //provide here the service name which will selected 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);

  • The topic ‘default shipping selection neeed’ is closed to new replies.