Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed WooCommerce coupon description not set issue.
Browse files Browse the repository at this point in the history
malayladu committed Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent e21b59b commit 5635132
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gravity-forms/gw-create-coupon.php
Original file line number Diff line number Diff line change
@@ -190,10 +190,10 @@ public function create_coupon_wc( $coupon_name, $coupon_code, $amount, $type, $e
$start_date = $date->format( 'Y-m-d H:i:s' );
}

// 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
// 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
$coupon = array(
'post_title' => $coupon_code,
'post_content' => $coupon_name,
'post_excerpt' => $coupon_name,
'post_status' => 'publish',
'post_author' => 1,
'post_type' => 'shop_coupon',

0 comments on commit 5635132

Please sign in to comment.