REMOVE “ADD TO CART” BUTTON – WORDPRESS

Jun

6

June 6 , 2015 | Posted by Igniweb | No Comments

REMOVE “ADD TO CART” BUTTON – WORDPRESS

To hide the “Add to cart” button copy and paste the following code in the functions.php template file that is active.

function remove_loop_button(){
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 );
}
add_action('init','remove_loop_button');

Add Comment

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