Hide quantity on the cart page in WooCommerce

This would sound extraordinary, but in some cases, the quantity field is not needed like when we sell show tickets or movie hall tickets. All the information is already on the product page. So to change the ticket number on the cart page will not be logical.
Here we can add this small snippet to fulfill the need. Add the following to the function.php in your child theme.

// Hide quantity number increment decrement on the cart page

function wps_remove_quantity_column() {

    if ( is_cart() ) return true;


add_filter( 'woocommerce_is_sold_individually', 'wps_remove_quantity_column', 10, 2 );

Edit WooCommerce Products from Frontend

Leave a Comment

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

Scroll to Top