Support » Plugin: WooCommerce » update to 3.7 broke cart and checkout on the same page

  • Hi,
    we are still developing a store and built it cart and checkout on the same page to prevent user interactions, as we are mostly sell to guest clients.
    He followed this article

    Everything was working fine, and we have tested in development the upgrade to the last version of woocoomerce as we noticed this in changelog:

    Enhancement – Prevent the Cart, Checkout and My Account pages from being set to the same pages. #23479

    We thought that the set of the page was not an issue, because we have not set the cart page to anything. The thing is that now when we press the button “update cart” it always redirects to the main page (I suspect that it´s because there is no cart page defined in admin).
    When we press the x to delete the product everything works ok.

    I found this in
    Why is it incorrect to set the Cart, Checkout and My Account pages to the same page?

    It results in incorrect redirects and broken payment gateway functionality. WooCommerce 3.7 prevents this from happening.

    My question is, why to prevent cart and checkout on the same page, as a lot of stores are evolving to this, instead of solving the problem in the gateways? That seems the real issue.

    How can we fix this and have the cart and checkout on the same page, now that this upgrade has broken it ? As the remove button is working and the “update cart” is not, maybe there is also a bug here when someone does not set a cart page in settings, like our case.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter jorgecorreia


    Nobody ?


    I have the same situation with a clients site. When there is no cart page selected in WooC settings the users gets redirected to front page on cart update or when adding a discount coupon.

    I’d say this is a bug and not a desired feature. If the cart is placed on the same page as checkout the users should stay on that page when the cart is updated and the page is refreshed (that is, when ajax is disabled).

    Plugin Support AW a11n


    Automattic Happiness Engineer

    Hey again!

    The reason it’s not allowed is spelled out above, and it’s not something that is going to change.

    If you want to have a one page checkout process, there are many plugins that do it properly, including this one:

    That will have a one step process for checking out, no separate cart page needed.

    Hopefully that helps! Have a great one!

    Thread Starter jorgecorreia


    I still don´t get why break this functionality instead of fixing the gateways, why should we need to buy a plugin when that´s something that woocommerce should be doing out of the box, why not mentioning it in the blog (although it was in change log ) and finally who shout it loud so you could change this. Did it also received an answer like “…it´s not something that is going to change” ?

    To Thelyall and webbverkstaden check one solution here

    To this problem “Now after adding items to cart the ‘view cart’ links just go to the homepage because no cart page can be set.” checkout my code with a fix in the comments

    /* overrides cart url  to checkout url, since it has no cart page set, and to make the update button work */
    add_filter('woocommerce_get_cart_url', 'atlier_cart_checkout_override');
    function atlier_cart_checkout_override () {
        return wc_get_page_permalink( 'checkout' );


    I’ve just checked the notes for the upcoming version 3.8 here:

    Line 226 says: Dev – Use wc_get_cart_url instead of wc_get_page_permalink( 'cart' ) because former has a filter woocommerce_get_cart_url to allow customization. #24530

    This might help with the manual customisation to get around the unnecessary restriction.

    Plugin Support AW a11n


    Automattic Happiness Engineer

    To clarify again, this was never supposed to work, it was fixed. It’s been in the documentation to not do this for a bit.

    The affiliate link is not mine, and is not a true affiliate link. It’s a tracker for all the official WooCommerce support agents to share when we recommend extensions. There’s no payout or anything traditionally associated with affiliates.

    There’s literally no financial incentive for me if you pick the one I linked or any other one. It’s the one that I know works, unlike many others we see in WooCommerce support.

    Moderator Jan Dembowski


    Forum Moderator and Brute Squad

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘update to 3.7 broke cart and checkout on the same page’ is closed to new replies.