woocommerce/assets/js/admin/meta-boxes-coupon.js

18 lines
353 B
JavaScript
Raw Normal View History

jQuery(function($) {
2014-07-08 13:14:29 +00:00
// Coupon type options
$('select#discount_type').change(function() {
2014-07-08 13:14:29 +00:00
// Get value
var select_val = $(this).val();
if ( select_val === 'fixed_product' || select_val === 'percent_product' ) {
$( '.limit_usage_to_x_items_field' ).show();
2014-07-08 13:14:29 +00:00
} else {
$( '.limit_usage_to_x_items_field' ).hide();
2014-07-08 13:14:29 +00:00
}
}).change();
});