Created
November 16, 2023 04:10
-
-
Save codersaiful/5d7520ddcdbb03c2ab8780acb3faa521 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
/** | |
* If you want to set Zero for default quantity value, | |
* this function and hook will help you. | |
* | |
* @author Saiful Islam <[email protected]> | |
*/ | |
add_filter('woocommerce_quantity_input_min','wpt_custom_default_quantity_zero'); | |
function wpt_custom_default_quantity_zero(){ | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment