How to remove shopping cart from WooCommerce plugin in Wordpress?

I use the Virtue theme in Wordpress and installed the WooCommerce plugin to set up my online store. I want to completely remove the shopping cart function and instead place the order form on a separate product page. Help is needed to eliminate the shopping cart.

+3
source share
3 answers

This is my experience with Woocommerce about recycling carts. I added this code in functions.php to my Virtue themes.

remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );

remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );

remove_action( 'woocommerce_simple_add_to_cart', 'woocommerce_simple_add_to_cart', 30 );

remove_action( 'woocommerce_grouped_add_to_cart', 'woocommerce_grouped_add_to_cart', 30 );

In this Web I used this code. Hope this helps solve your problems. Thank:)

+3
source

WooCommerce Wordpress, "" :

> > WooCommerce > >

enter image description here

0

Using firefox, right-click on the cart and open the inspector . Find the css that is used in the right pane. Then in the change subject add custom css, for example:

.woocommerce-active .site-header .site-header-cart {
  display: none !important;
}

(In the above code, “.woocommerce-active.site-header.site-header-cart” was in the “inspector” right pane. In edit mode, you can immediately see the result, so make a few attempts if the CSS name is incorrect.)

0
source

All Articles