From d99a39f0c0551111aa776662cad2545a9beb87aa Mon Sep 17 00:00:00 2001 From: Malay Ladu Date: Thu, 19 Dec 2024 21:42:12 +0530 Subject: [PATCH] `gw-create-coupon.php`: Fixed WooCommerce coupon description not set issue. --- gravity-forms/gw-create-coupon.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gravity-forms/gw-create-coupon.php b/gravity-forms/gw-create-coupon.php index c4c9d639a..e3d05fee2 100644 --- a/gravity-forms/gw-create-coupon.php +++ b/gravity-forms/gw-create-coupon.php @@ -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 * @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',