From 12952ebcd015aea840a6e7c43d07feaa6e48dbe8 Mon Sep 17 00:00:00 2001 From: Claudiu Lodromanean Date: Mon, 13 Mar 2017 15:06:44 -0700 Subject: [PATCH] Update coupon meta box with new date handling --- includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php index 5e3c4db9b39..fef66a44bc7 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php @@ -92,7 +92,7 @@ class WC_Meta_Box_Coupon_Data { } // Expiry date - $expiry_date = $coupon->get_date_expires() ? date( 'Y-m-d', $coupon->get_date_expires() ) : ''; + $expiry_date = $coupon->get_date_expires() ? $coupon->get_date_expires()->date( 'Y-m-d' ) : ''; woocommerce_wp_text_input( array( 'id' => 'expiry_date', 'value' => esc_attr( $expiry_date ),