Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search


  • Posts

  • Joined

  • Last visited

Posts posted by alexanderbiscajin

  1. You don't have to worry about how you going to remove the add to cart buttons from shop page or any specific product page. Now you just have to follow these simple steps to disable the add to cart button from your Shop page.

    Add this code to woocommerce.php (located wp-content/plugins/woocommerce):

    function WpBlog() {

    removeaction( 'woocommerceaftershoploopitem', 'woocommercetemplateloopaddtocart');

    removeaction( 'woocommercesingleproductsummary',


    return WooCommerce::instance();}

    You will see that the add to cart button has been disabled.

    Now you can also remove or hide the button from product pages. Just put this code in functions.php

    addfilter('woocommerceispurchasable', 'wpblogspecific_product');

    function wpblogspecificproduct($purchaseableproductwpblog, $product) {

    return ($product->id == specificproductid (512) ? false : $purchaseableproductwpblog);


    If you still having difficulty doing the following steps you can just see that as reference https://www.wpblog.com/add-to-cart-button-in-woocommerce-store/

  • Create New...