Created
March 3, 2021 11:39
-
-
Save plugin-republic/6e446d122ecdc28fc81c2b90a1ac1d08 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Use this filter to set a different default quantity for child products | |
*/ | |
function prefix_filter_default_child_independent_quantity( $quantity_field_value, $child_product_id, $item ) { | |
return 1; | |
} | |
add_filter( 'pewc_child_product_independent_quantity', 'prefix_filter_default_child_independent_quantity', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment