Use date_expires meta key

This commit is contained in:
Claudiu Lodromanean 2017-03-15 07:38:57 -07:00
parent cb3568add9
commit 111246771c
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ class WC_Coupon_Data_Store_CPT extends WC_Data_Store_WP implements WC_Coupon_Dat
'discount_type', 'discount_type',
'coupon_amount', 'coupon_amount',
'expiry_date', 'expiry_date',
'expiry_date_utc', 'date_expires',
'usage_count', 'usage_count',
'individual_use', 'individual_use',
'product_ids', 'product_ids',
@ -96,7 +96,7 @@ class WC_Coupon_Data_Store_CPT extends WC_Data_Store_WP implements WC_Coupon_Dat
'description' => $post_object->post_excerpt, 'description' => $post_object->post_excerpt,
'date_created' => strtotime( $post_object->post_date_gmt ), 'date_created' => strtotime( $post_object->post_date_gmt ),
'date_modified' => strtotime( $post_object->post_modified_gmt ), 'date_modified' => strtotime( $post_object->post_modified_gmt ),
'date_expires' => metadata_exists( 'post', $coupon_id, 'expiry_date_utc' ) ? get_post_meta( $coupon_id, 'expiry_date_utc', true ) : get_post_meta( $coupon_id, 'expiry_date', true ), 'date_expires' => metadata_exists( 'post', $coupon_id, 'date_expires' ) ? get_post_meta( $coupon_id, 'date_expires', true ) : get_post_meta( $coupon_id, 'expiry_date', true ),
'discount_type' => get_post_meta( $coupon_id, 'discount_type', true ), 'discount_type' => get_post_meta( $coupon_id, 'discount_type', true ),
'amount' => get_post_meta( $coupon_id, 'coupon_amount', true ), 'amount' => get_post_meta( $coupon_id, 'coupon_amount', true ),
'usage_count' => get_post_meta( $coupon_id, 'usage_count', true ), 'usage_count' => get_post_meta( $coupon_id, 'usage_count', true ),
@ -181,7 +181,7 @@ class WC_Coupon_Data_Store_CPT extends WC_Data_Store_WP implements WC_Coupon_Dat
'usage_limit_per_user' => 'usage_limit_per_user', 'usage_limit_per_user' => 'usage_limit_per_user',
'limit_usage_to_x_items' => 'limit_usage_to_x_items', 'limit_usage_to_x_items' => 'limit_usage_to_x_items',
'usage_count' => 'usage_count', 'usage_count' => 'usage_count',
'expiry_date_utc' => 'date_expires', 'date_expires' => 'date_expires',
'free_shipping' => 'free_shipping', 'free_shipping' => 'free_shipping',
'product_categories' => 'product_categories', 'product_categories' => 'product_categories',
'exclude_product_categories' => 'excluded_product_categories', 'exclude_product_categories' => 'excluded_product_categories',