From 0d9db814a99ce32f6af606ad8a36a64e6cde66be Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Thu, 23 May 2019 03:14:35 +0000 Subject: [PATCH] added checkin field into csv export --- inc/mep_csv_export.php | 32 ++++++++++++++++++++++++++++---- woocommerce-event-press.php | 2 +- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/inc/mep_csv_export.php b/inc/mep_csv_export.php index 97580b9..ed1cd87 100644 --- a/inc/mep_csv_export.php +++ b/inc/mep_csv_export.php @@ -32,7 +32,8 @@ function mep_get_event_user_fields($post_id){ 'Email', 'Phone', 'Addresss', - 'Tee Size' + 'Tee Size', + 'Check in' ); @@ -59,6 +60,16 @@ return array_merge($row, $crow, $exs); function mep_get_event_user_fields_data($post_id,$event){ $values = get_post_custom( $post_id ); + + $checkin_status = get_post_meta($post_id,'mep_checkin',true); + + if($checkin_status){ + $status = $checkin_status; + }else{ + $status = 'no'; + } + + $row = array( get_post_meta( $post_id, 'ea_order_id', true ), get_post_meta( $post_id, 'ea_event_name', true ), @@ -67,7 +78,8 @@ $values = get_post_custom( $post_id ); get_post_meta( $post_id, 'ea_email', true ), get_post_meta( $post_id, 'ea_phone', true ), get_post_meta( $post_id, 'ea_address_1', true ), - get_post_meta( $post_id, 'ea_tshirtsize', true ) + get_post_meta( $post_id, 'ea_tshirtsize', true ), + $status ); $crow = array(); $mep_form_builder_data = get_post_meta($event, 'mep_form_builder_data', true); @@ -178,7 +190,8 @@ function csv_export() { 'Email', 'Phone', 'Addresss', - 'Tee Size' + 'Tee Size', + 'Check in' ); } @@ -224,6 +237,16 @@ if($status=='publish'){ $row = mep_get_event_user_fields_data($post_id,$event); }else{ $post_id = $post->ID; + + + $checkin_status = get_post_meta($post_id,'mep_checkin',true); + + if($checkin_status){ + $status = $checkin_status; + }else{ + $status = 'no'; + } + $row = array( get_post_meta( $post_id, 'ea_order_id', true ), get_post_meta( $post_id, 'ea_event_name', true ), @@ -232,7 +255,8 @@ if($status=='publish'){ get_post_meta( $post_id, 'ea_email', true ), get_post_meta( $post_id, 'ea_phone', true ), get_post_meta( $post_id, 'ea_address_1', true ), - get_post_meta( $post_id, 'ea_tshirtsize', true ) + get_post_meta( $post_id, 'ea_tshirtsize', true ), + $status ); } diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php index 6dfdccf..e75316b 100644 --- a/woocommerce-event-press.php +++ b/woocommerce-event-press.php @@ -3,7 +3,7 @@ * Plugin Name: Woocommerce Events Manager * Plugin URI: http://mage-people.com * Description: A Complete Event Solution for WordPress by MagePeople.. -* Version: 2.5.9 +* Version: 2.6.0 * Author: MagePeople Team * Author URI: http://www.mage-people.com/ * Text Domain: mage-eventpress