How to remove WooCommerce cart and merge with cart page

These days, we are changing the system of the Mihan WordPress website from Easy Digital Downloads to WooCommerce, and simplifying the process of a purchase from a website is one of the things that we must pay attention to. In addition to using the WC Digital Checkout plugin, we can do more to improve the shopping process in WooCommerce. You can increase your sales by placing a WooCommerce shopping cart and checkout on a single page or removing the WooCommerce cart step on the checkout.

This tutorial is a complete guide to increase your sales. Because by doing the steps, the purchase process on your website will be much easier. By default in WooCommerce, the user must click the Add to Cart button to purchase a product, view and confirm the cart, and finally, enter their information and enter the payment gateway.

Now we want to reduce these steps. By deleting the WooCommerce shopping cart step! That is, the user adds the product to the cart. Enter the checkout and finally enter the payment gateway.

Show WooCommerce cart on the checkout page

But let’s see how to remove the WooCommerce shopping cart. Or it is better to say how the shopping cart can be displayed on the checkout page. To do this, first enter the following code in the funtions.php file of your WordPress template:

add_action( 'woocommerce_before_checkout_form', 'mihanwp_cart_on_checkout_page_only', 5 );
function mihanwp_cart_on_checkout_page_only() {
if ( is_wc_endpoint_url( 'order-received' ) ) return;
echo do_shortcode('[woocommerce_cart]');

We displayed the shopping cart on the WooCommerce checkout page by entering the above code.

Place your shopping cart on the WooCommerce Pony page
Place your shopping cart on the WooCommerce Pony page

Remove shopping cart page from WooCommerce

Now we need to remove the WooCommerce shopping cart. Because we do not need it.

Go to WooCommerce > Configuration.

WooCommerce settings
WooCommerce settings

Then enter the advanced section.

Advanced WooCommerce settings
Advanced WooCommerce settings

Here we have to remove the WooCommerce shopping cart page. Then click on the cross next to the cart to disable it.

Remove shopping cart page from WooCommerce
Remove shopping cart page from WooCommerce.

Save the settings and enter the pages section. Then remove the shopping cart page from your WordPress website pages list.

Just as easily! Now you can use WooCommerce without a shopping cart page and have more sales with more manageable shopping steps.

Don’t forget that your checkout page should be replaced wherever you link to the shopping cart page.

be happy. 🙂

Leave a Reply