How to disable default shipping and payment options on checkout with WooCommerce?

I am looking for a way to disable the default payment option and shipping option on the “view cart” and/or “checkout” pages on WooCommerce.

Everything I have tried did not work. JS is failing since this section is keeping refreshed. and PHP fails since it refreshes unselected on every change in the cart.

Read More

Any idea of how to do that?

Thanks

Related posts

1 comment

  1. This should do the trick:

    add_filter( 'pre_option_woocommerce_default_gateway' . '__return_false', 99 );
    add_filter( 'woocommerce_shipping_chosen_method', '__return_false', 99);
    

    This does only remove the default selection. If the selection is stored in your session it will be applied as normal. Keep that in mind when testing.

    Edit: Unfortunately, since WooCommerce 4+ this does not work anymore.

Comments are closed.