Method 1: Use plug-ins
YITH WooCommerce Catalog Mode
MMWD Remove Add To Cart for WooCommerce
Method 2: Hidden in the theme setting
Method 3: Use code
add_filter( 'woocommerce_is_purchasable', '__return_false');
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', 30 );
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_price', 10 ); remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
//Another way to remove prices add_filter( 'woocommerce_get_price_html', 'naibabiji_remove_price'); function naibabiji_remove_price($price){ return ; }
Method of retaining variant product information and deleting shopping cart button
add_action( 'woocommerce_single_product_summary', 'hide_add_to_cart_button_variable_product', 1, 0 ); function hide_add_to_cart_button_variable_product() { //Only delete the shopping cart button and quantity, and keep the variation remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 ); }
Related content