add option to enable / disable coupon form on cart page
This commit is contained in:
parent
a239922632
commit
28f9c40700
|
@ -148,6 +148,15 @@ $woocommerce_settings['general'] = apply_filters('woocommerce_general_settings',
|
||||||
'show_if_checked' => 'option'
|
'show_if_checked' => 'option'
|
||||||
),
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
'desc' => __( 'Enable coupon form on cart', 'woocommerce' ),
|
||||||
|
'id' => 'woocommerce_enable_coupon_form_on_cart',
|
||||||
|
'std' => 'yes',
|
||||||
|
'type' => 'checkbox',
|
||||||
|
'checkboxgroup' => '',
|
||||||
|
'show_if_checked' => 'yes'
|
||||||
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'desc' => __( 'Enable coupon form on checkout', 'woocommerce' ),
|
'desc' => __( 'Enable coupon form on checkout', 'woocommerce' ),
|
||||||
'id' => 'woocommerce_enable_coupon_form_on_checkout',
|
'id' => 'woocommerce_enable_coupon_form_on_checkout',
|
||||||
|
|
|
@ -106,7 +106,7 @@ global $woocommerce;
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6" class="actions">
|
<td colspan="6" class="actions">
|
||||||
|
|
||||||
<?php if ( get_option( 'woocommerce_enable_coupons' ) == 'yes' ) { ?>
|
<?php if ( get_option( 'woocommerce_enable_coupons' ) == 'yes' && get_option( 'woocommerce_enable_coupon_form_on_cart' ) == 'yes') { ?>
|
||||||
<div class="coupon">
|
<div class="coupon">
|
||||||
|
|
||||||
<label for="coupon_code"><?php _e('Coupon', 'woocommerce'); ?>:</label> <input name="coupon_code" class="input-text" id="coupon_code" value="" /> <input type="submit" class="button" name="apply_coupon" value="<?php _e('Apply Coupon', 'woocommerce'); ?>" />
|
<label for="coupon_code"><?php _e('Coupon', 'woocommerce'); ?>:</label> <input name="coupon_code" class="input-text" id="coupon_code" value="" /> <input type="submit" class="button" name="apply_coupon" value="<?php _e('Apply Coupon', 'woocommerce'); ?>" />
|
||||||
|
|
Loading…
Reference in New Issue