• Resolved wonderiiiik

    (@wonderiiiik)


    Hi, I need help with my shipping methods. Right now I have by default Local pick-up method, but I want to have shipping method deselected, so the customer is forced to choose shipping method by himself. I found this old code:

    add_filter( ‘woocommerce_shipping_chosen_method’, ‘__return_false’, 99);

    But my problem with it is that then you cannot add products to the cart, because woocommerce is adding products to the cart with shipping method.

    Is there option to have no default shipping method?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @wonderiiiik,

    Thank you for reaching out!

    But my problem with it is that then you cannot add products to the cart, because woocommerce is adding products to the cart with shipping method.

    This approach still works fine. :?)

    You can also try:

    add_filter( 'woocommerce_shipping_chosen_method', '__return_empty_string', 10, 3 );


    You may need to clear your current cart sessions before it can start functioning properly. This can be done by going to WooCommerce → Status → Tools.

    If you’re still having issues with the checkout process after doing so, it might be because something is overriding the cart/checkout behaviour.

    To pinpoint the plugin or theme that’s causing the problem, you can perform a conflict test. You can find more information on how to resolve conflict issues at https://woocommerce.com/document/how-to-test-for-conflicts.



    Let us know if you have any other questions. :?)

Viewing 1 replies (of 1 total)
  • The topic ‘Preselect default shipping method’ is closed to new replies.