Disable cart page but keep the checkout page in Woocommerce


Staff member
I'm currently looking for a better way then this question here to remove / disable the cart page in my WooCommerce installation:

<a href="https://wordpress.stackexchange.com/questions/135025/disabling-shopping-basket-in-woocommerce">Disabling shopping basket in WooCommerce</a>

So I want to show a 404 instead of a redirect so that it's clear that this page doesn't exists.

The functionality must be there because my shop can't work anymore without this.

To make all clear:


I've build a custom button which adds the products to the "cart" and redirect directly to the checkout page. This should be the only available process!