Created
September 30, 2021 23:37
-
-
Save vandanojan/a71a8ea12005ee966f132e1361f0c011 to your computer and use it in GitHub Desktop.
woocommerce: remove quantity selector for all products
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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