Created
December 8, 2019 20:35
-
-
Save bulentsakarya/68599ddb3d0c6ffd10fc55bdfeb3f724 to your computer and use it in GitHub Desktop.
WooCommerce ürün satış miktarını değiştirme
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
/* | |
* Changing the maximum quantity to 5 for all the WooCommerce products | |
*/ | |
function woocommerce_quantity_input_max_callback( $max, $product ) { | |
$max = 5; | |
return $max; | |
} | |
add_filter( 'woocommerce_quantity_input_max', 'woocommerce_quantity_input_max_callback', 10, 2 ); |
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
/* | |
* Changing the minimum quantity to 2 for all the WooCommerce products | |
*/ | |
function woocommerce_quantity_input_min_callback( $min, $product ) { | |
$min = 2; | |
return $min; | |
} | |
add_filter( 'woocommerce_quantity_input_min', 'woocommerce_quantity_input_min_callback', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment