Skip to content

Commit 5635132

Browse files
committed
Fixed WooCommerce coupon description not set issue.
1 parent e21b59b commit 5635132

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gravity-forms/gw-create-coupon.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ public function create_coupon_wc( $coupon_name, $coupon_code, $amount, $type, $e
190190
$start_date = $date->format( 'Y-m-d H:i:s' );
191191
}
192192

193-
// WooCommerce coupon uses the Post Title as the coupon code hence $coupon_code is assigned to Post Title and $coupon_name is assigned to the Post Content
193+
// WooCommerce coupon uses the Post Title as the coupon code hence $coupon_code is assigned to Post Title and $coupon_name is assigned to the Post Excerpt
194194
$coupon = array(
195195
'post_title' => $coupon_code,
196-
'post_content' => $coupon_name,
196+
'post_excerpt' => $coupon_name,
197197
'post_status' => 'publish',
198198
'post_author' => 1,
199199
'post_type' => 'shop_coupon',

0 commit comments

Comments
 (0)