Remove WooCommerce cart and move it to the checkout page

Remove WooCommerce cart and move it to the checkout page

These days, we are changing the system of Mihanwordpress website from Easy Digital Downloads to WooCommerce, and simplifying the process of buying 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 remove the WooCommerce cart step on checkout

This tutorial is a complete guide to increase your sales. Because by doing the steps, the purchase process on your site will be much easier. By default in WooCommerce, the user must click the Add to Cart button to purchase a product, then 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 settlement page. To do this, just 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]');
}

By entering the above code, we displayed the shopping cart on the WooCommerce settlement page.

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 page list.

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

Don’t forget that wherever you link to the shopping cart page, your settlement page should be linked.

be happy. 🙂

What do you think about this?

Please submit your comment only on the subject of this article. Your questions will be answered by the community.

Ask Question