Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vandanojan/a71a8ea12005ee966f132e1361f0c011 to your computer and use it in GitHub Desktop.
Save vandanojan/a71a8ea12005ee966f132e1361f0c011 to your computer and use it in GitHub Desktop.
woocommerce: remove quantity selector for all products
/**
* Remove Quantity Selector for All Products
*/
function wc_remove_all_quantity_fields( $return, $product ) {
return true;
}
add_filter( 'woocommerce_is_sold_individually', 'wc_remove_all_quantity_fields', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment