Last active
November 3, 2017 07:13
-
-
Save kartikparmar/b8111c6f4a6eaa4f9de7db7bf8149d4c 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 | |
function wc_qty_add_product_field() { | |
echo '<div class="options_group">'; | |
woocommerce_wp_text_input( | |
array( | |
'id' => '_wc_min_qty_product', | |
'label' => __( 'Minimum Quantity', 'woocommerce-max-quantity' ), | |
'placeholder' => '', | |
'desc_tip' => 'true', | |
'description' => __( 'Optional. Set a minimum quantity limit allowed per order. Enter a number, 1 or greater.', 'woocommerce-max-quantity' ) | |
) | |
); | |
echo '</div>'; | |
echo '<div class="options_group">'; | |
woocommerce_wp_text_input( | |
array( | |
'id' => '_wc_max_qty_product', | |
'label' => __( 'Maximum Quantity', 'woocommerce-max-quantity' ), | |
'placeholder' => '', | |
'desc_tip' => 'true', | |
'description' => __( 'Optional. Set a maximum quantity limit allowed per order. Enter a number, 1 or greater.', 'woocommerce-max-quantity' ) | |
) | |
); | |
echo '</div>'; | |
} | |
add_action( 'woocommerce_product_options_inventory_product_data', 'wc_qty_add_product_field' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment