How to Remove “Add to Cart” Button in WooCommerce?

Before you can alter Woocommerce , And you have to do is install WooCommerce plugin. You can download it for nothing from the WordPress store.

I will presently examine how to hide, evacuate or disable the Add to Cart button on WooCommerce shop pages. There are numerous reasons why WooCommerce storekeeper can incidentally or for all time cripple include truck button their site, for example, an item is out of stock.

Go to the WooCommerce store and add an product. Give it a name and attempt to fill whatever number subtleties as could be expected under the circumstances for this test item.

In the frontend of the store, you will presently observe the product detail page.

Remove the Add to Cart Button in WooCommerce.

I will currently exhibit how to remove this button from item detail page and the shop page (item posting page). For this, we’ll add the following hooks:

[php]

<code>remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);</code>
<code>
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’);</code>

[/php]

The beneficial thing about these hooks is that you could put them anyplace suitable. The basic practice is to remember these snares for functions.php which is situated in your topic organizer. Notwithstanding, this may cause blunders at times. I will, thusly, place these snares in woocommerce.php (found in the plugin folder).

To get to this document, of to WordPress > wp-content > plugin > woocommerce > woocommerce.php.

[php]

<code>function wbcomdesign() {
remove_action( ‘woocommerce_after_shop_loop_item’, ‘woocommerce_template_loop_add_to_cart’);
remove_action( ‘woocommerce_single_product_summary’, ‘woocommerce_template_single_add_to_cart’);
return WooCommerce::instance();</code>

[/php]

When done, cave the document and revive the page. When the page loads, you will see that the Add to Cart button has been revoved from the page.

FreeĀ Remove Add to Cart WooCommerce Plugin:

This Plugin performs following capacities

1-Remove/Disable Add to Cart from Complete Category.

2-Replace Add to Cart button with Inquire Us from Complete Category.

3-Remove Add to truck from singular Product pages.

4-Replace Add to truck with Inquire us from item pages.

5-Hide cost from Complete Category

6-Hide Price per Product

Leave a Reply

Your email address will not be published. Required fields are marked *