-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gw-create-coupon.php
: Fixed WooCommerce coupon description not set …
…issue.
- Loading branch information
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* | ||
* Create coupons via Gravity Forms submissions. Map the coupon code to a field on the GF form and voila! | ||
* | ||
* @version 1.2.2 | ||
* @version 1.2.3 | ||
* @author David Smith <[email protected]> | ||
* @license GPL-2.0+ | ||
* @link WooCommerce: http://gravitywiz.com/creating-coupons-woocommerce-gravity-forms/ | ||
|
@@ -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', | ||
|