woocommerce_coupon_discount_types filter added

This commit is contained in:
Mike Jolley 2011-10-03 11:37:16 +01:00
parent 4a1f655444
commit be0d96726e
1 changed files with 2 additions and 2 deletions

View File

@ -30,11 +30,11 @@ function woocommerce_coupon_data_meta_box($post) {
$field = array( 'id' => 'discount_type', 'label' => __('Discount type', 'woothemes') ); $field = array( 'id' => 'discount_type', 'label' => __('Discount type', 'woothemes') );
echo '<p class="form-field"><label for="'.$field['id'].'">'.$field['label'].':</label><select name="'.$field['id'].'" id="'.$field['id'].'">'; echo '<p class="form-field"><label for="'.$field['id'].'">'.$field['label'].':</label><select name="'.$field['id'].'" id="'.$field['id'].'">';
$discount_types = array( $discount_types = apply_filters('woocommerce_coupon_discount_types', array(
'fixed_cart' => __('Cart Discount', 'woothemes'), 'fixed_cart' => __('Cart Discount', 'woothemes'),
'percent' => __('Cart % Discount', 'woothemes'), 'percent' => __('Cart % Discount', 'woothemes'),
'fixed_product' => __('Product Discount', 'woothemes') 'fixed_product' => __('Product Discount', 'woothemes')
); ));
foreach ($discount_types as $type => $label) : foreach ($discount_types as $type => $label) :
echo '<option value="'.$type.'" '; echo '<option value="'.$type.'" ';