• Resolved Kris Kelvin

    (@kanlukasz)


    I would like to disable the ability to change shipping method on the Checkout page.
    The user selects the shipping method on the Cart page and I do not want to let them change it on the Checkout page.

    I’m looking for some filter that can be used there. What I found is woocommerce_cart_ready_to_calc_shipping but it completely hides it.

    Note: I would not like to overwrite the template file so I am looking for an way with a filter or action

Viewing 4 replies - 1 through 4 (of 4 total)
  • Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @kanlukasz!

    One option would be to use some CSS and then do use the pointer-events to make the checkout page shipping non-clickable/selectable.

    Something like this (tested for Storefront theme):

    .woocommerce-checkout ul#shipping_method {
        pointer-events: none;
    }

    This CSS code can be added to the “Additional CSS” section found in your customizer.

    It may need some tweaking for your theme though so if it doesn’t work, please share your site URL so we can take a closer look.

    Cheers!

    Thread Starter Kris Kelvin

    (@kanlukasz)

    Hi @rynald0s
    Thank you for your answer.

    Doing something like this with CSS is like keeping your home door closed, but not locked – at first glance you can’t open, but anyone smarter can open it anyway ??

    I am looking for a solid solution. I considered using woocommerce_package_rates only whenis_checkout but not sure it’s right way

    Plugin Support Dani F. a11n

    (@danielinhou)

    Hi there,

    I understand what you mean and that was a really funny example.

    This is a fairly complex development topi so I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers!

    Plugin Support Damianne P (a11n)

    (@drwpcom)

    Hi @kanlukasz. We haven’t heard from you in a while so I’m going to go ahead and mark this thread as resolved. If you still need help with this issue or have any other questions about the WooCommerce plugin, please start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable the ability to change shipping method on the checkout page’ is closed to new replies.