From db2de990e75e09c87d3b809dce996f4974affeaf Mon Sep 17 00:00:00 2001 From: Gerhard Date: Wed, 5 Mar 2014 09:28:59 +0200 Subject: [PATCH] Modify duplicate coupon error code --- includes/api/class-wc-api-coupons.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/api/class-wc-api-coupons.php b/includes/api/class-wc-api-coupons.php index 364274c0052..765e21e1209 100644 --- a/includes/api/class-wc-api-coupons.php +++ b/includes/api/class-wc-api-coupons.php @@ -241,6 +241,8 @@ class WC_API_Coupons extends WC_API_Resource { $coupon_data = wp_parse_args( $data, $defaults ); + $coupon_code = + $new_coupon = array( 'post_title' => wc_clean( $coupon_data['code'] ), 'post_content' => '',