")
+ .html("")
);
}
@@ -175,7 +175,7 @@ jQuery('#quantity_5a7abbd1bff73').on('change', function () {
jQuery('#divParent').append(
jQuery('
"+i+"
' required='required' name='user_name[]' class='mep_input' placeholder=''/>
' required='required' name='user_email[]' class='mep_input' placeholder=''/>
' required='required' name='user_phone[]' class='mep_input' placeholder=''/>
' name='user_company[]' class='mep_input' placeholder=''/>
' name='user_designation[]' class='mep_input' placeholder=''/>
' name='user_website[]' class='mep_input' placeholder=''/>
")
+ .html("")
);
}
diff --git a/templates/template-prts/event_add_cart.php b/templates/template-prts/event_add_cart.php
index 622171b..12bd87c 100644
--- a/templates/template-prts/event_add_cart.php
+++ b/templates/template-prts/event_add_cart.php
@@ -122,10 +122,7 @@ $mep_event_ticket_type = get_post_meta($post->ID, 'mep_event_ticket_type', true)
if(!$mep_event_ticket_type){
if($qm){$qm=$qm;}else{$qm='';}
?>
-
+
diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php
index 2ff6f55..a2414c5 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.1.7
+* Version: 2.1.8
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
@@ -168,119 +168,6 @@ $site_name = get_option( 'blogname' );
}
}
-
-
-
-
-// Get user information and save to attendee list after order confirmation
-add_action( 'woocommerce_order_status_completed_notification', 'mep_set_event_attendee_data' );
-function mep_set_event_attendee_data( $order_id ) {
-
- if ( ! $order_id )
- return;
-
- // Getting an instance of the order object
- $order = wc_get_order( $order_id );
- $order_meta = get_post_meta($order_id);
-
- $order_meta_text = "_stock_msg_".$order_id;
- $order_processing = "processing_".$order_id;
- $order_completed = "completed_".$order_id;
- $order_cancelled = "cancelled_".$order_id;
-
- # Iterating through each order items (WC_Order_Item_Product objects in WC 3+)
- foreach ( $order->get_items() as $item_id => $item_values ) {
- $product_id = $item_values->get_product_id();
- $item_data = $item_values->get_data();
- $product_id = $item_data['product_id'];
- $item_quantity = $item_values->get_quantity();
- $product = get_page_by_title( $item_data['name'], OBJECT, 'mep_events' );
- $event_name = $item_data['name'];
- $event_id = $product->ID;
- $item_id = $item_id;
- }
-
-$user_info_arr = wc_get_order_item_meta($item_id,'_event_user_info',true);
-
-
- $first_name = $order_meta['_billing_first_name'][0];
- $last_name = $order_meta['_billing_last_name'][0];
- $company_name = $order_meta['_billing_company'][0];
- $address_1 = $order_meta['_billing_address_1'][0];
- $address_2 = $order_meta['_billing_address_2'][0];
- $city = $order_meta['_billing_city'][0];
- $state = $order_meta['_billing_state'][0];
- $postcode = $order_meta['_billing_postcode'][0];
- $country = $order_meta['_billing_country'][0];
- $email = $order_meta['_billing_email'][0];
- $phone = $order_meta['_billing_phone'][0];
- $billing_intotal = $order_meta['_billing_address_index'][0];
- $payment_method = $order_meta['_payment_method_title'][0];
- $user_id = $order_meta['_customer_user'][0];
-
-$mep_atnd = "_mep_atnd_".$order_id;
-
- $mep_stock_msgc = get_post_meta($event_id,$mep_atnd, true);
-
- mep_event_confirmation_email_sent($event_id,$email);
-
-if($mep_stock_msgc!='a2'){
-
- foreach ($user_info_arr as $_user_info) {
- $uname = $_user_info['user_name'];
- $email = $_user_info['user_email'];
- $phone = $_user_info['user_phone'];
- $address = $_user_info['user_address'];
- $gender = $_user_info['user_gender'];
- $company = $_user_info['user_company'];
- $designation = $_user_info['user_designation'];
- $website = $_user_info['user_website'];
- $vegetarian = $_user_info['user_vegetarian'];
- $tshirtsize = $_user_info['user_tshirtsize'];
- $ticket_type = $_user_info['user_ticket_type'];
- $mep_ucf = $_user_info['mep_ucf'];
-
- // ADD THE FORM INPUT TO $new_post ARRAY
- $new_post = array(
- 'post_title' => $uname,
- 'post_content' => '',
- 'post_category' => array(), // Usable for custom taxonomies too
- 'tags_input' => array(),
- 'post_status' => 'publish', // Choose: publish, preview, future, draft, etc.
- 'post_type' => 'mep_events_attendees' //'post',page' or use a custom post type if you want to
- );
-
- //SAVE THE POST
- $pid = wp_insert_post($new_post);
- $update_fname = update_post_meta( $pid, 'ea_name', $uname);
- $update_uid = update_post_meta( $pid, 'ea_user_id', $user_id);
- $update_ad1 = update_post_meta( $pid, 'ea_address_1', $address);
- $update_email = update_post_meta( $pid, 'ea_email', $email);
- $update_phone = update_post_meta( $pid, 'ea_phone', $phone);
- $update_gender = update_post_meta( $pid, 'ea_gender', $gender);
- $update_company = update_post_meta( $pid, 'ea_company', $company);
- $update_desg = update_post_meta( $pid, 'ea_desg', $designation);
- $update_web = update_post_meta( $pid, 'ea_website', $website);
- $update_veg = update_post_meta( $pid, 'ea_vegetarian', $vegetarian);
- $update_teesize = update_post_meta( $pid, 'ea_tshirtsize', $tshirtsize);
- $update_ticket_type = update_post_meta( $pid, 'ea_ticket_type', $ticket_type);
- $update_pym = update_post_meta( $pid, 'ea_payment_method', $payment_method);
- $update_event_name = update_post_meta( $pid, 'ea_event_name', $event_name);
- $update_eid = update_post_meta( $pid, 'ea_event_id', $event_id);
- $update_oid = update_post_meta( $pid, 'ea_order_id', $order_id);
- // Checking if the form builder addon is active and have any custom fields
- $mep_form_builder_data = get_post_meta($event_id, 'mep_form_builder_data', true);
- if ( $mep_form_builder_data ) {
- foreach ( $mep_form_builder_data as $_field ) {
- update_post_meta( $pid, "ea_".$_field['mep_fbc_id'], $_user_info[$_field['mep_fbc_id']]);
- }
- }
-
-
- }
-}
-
-}
}
@@ -543,32 +430,12 @@ function mep_attendee_filter_query($query) {
}
-add_filter( 'post_row_actions', 'mep_remove_row_actions', 10, 1 );
-function mep_remove_row_actions( $actions )
-{
- if( get_post_type() === 'mep_events_attendees' )
- // unset( $actions['edit'] );
- // unset( $actions['view'] );
- unset( $actions['trash'] );
- unset( $actions['inline hide-if-no-js'] );
- return $actions;
-}
-// Add the custom columns to the book post type:
-add_filter( 'manage_mep_events_posts_columns', 'mep_set_custom_edit_event_columns' );
-function mep_set_custom_edit_event_columns($columns) {
- unset( $columns['date'] );
-
- $columns['mep_status'] = __( 'Status', 'mage-eventpress' );
- $columns['mep_atten'] = __( 'Attendees', 'mage-eventpress' );
-
- return $columns;
-}
// Add the data to the custom columns for the book post type:
@@ -624,84 +491,6 @@ function mep_event_redirect_to_checkout() {
-// Add the custom columns to the book post type:
-add_filter( 'manage_mep_events_attendees_posts_columns', 'mep_set_custom_events_attendees_columns' );
-function mep_set_custom_events_attendees_columns($columns) {
-
- unset( $columns['title'] );
- unset( $columns['date'] );
-
- $columns['mep_uid'] = __( 'Unique ID', 'mepevvent' );
- $columns['mep_fn'] = __( 'Full Name', 'mage-eventpress' );
- // $columns['mep_email'] = __( 'email', 'mep' );
- // $columns['mep_phone'] = __( 'Phone', 'mep' );
- // $columns['mep_address'] = __( 'Addresss', 'mep' );
- // $columns['mep_tsize'] = __( 'Tee Size', 'mep' );
- $columns['mep_ttype'] = __( 'Ticket', 'mage-eventpress' );
- $columns['mep_evnt'] = __( 'Event', 'mage-eventpress' );
-
- return $columns;
-}
-
-
-// Add the data to the custom columns for the book post type:
-add_action( 'manage_mep_events_attendees_posts_custom_column' , 'mep_events_attendees_column', 10, 2 );
-function mep_events_attendees_column( $column, $post_id ) {
- switch ( $column ) {
-
- case 'mep_uid' :
- echo get_post_meta( $post_id, 'ea_user_id', true ).get_post_meta( $post_id, 'ea_order_id', true ).$post_id;
- break;
-
- case 'mep_fn' :
- echo get_post_meta( $post_id, 'ea_name', true );
- break;
-
- case 'mep_email' :
- echo get_post_meta( $post_id, 'ea_email', true );
- break;
-
- case 'mep_phone' :
- echo get_post_meta( $post_id, 'ea_phone', true );
- break;
-
- case 'mep_tsize' :
- echo get_post_meta( $post_id, 'ea_tshirtsize', true );
- break;
-
- case 'mep_address' :
- echo get_post_meta( $post_id, 'ea_address_1', true )."
".get_post_meta( $post_id, 'ea_address_2', true )."
".get_post_meta( $post_id, 'ea_state', true ).", ".get_post_meta( $post_id, 'ea_city', true ).", ".get_post_meta( $post_id, 'ea_country', true );
- break;
-
- case 'mep_ttype' :
- echo get_post_meta( $post_id, 'ea_ticket_type', true );
- break;
-
- case 'mep_evnt' :
- echo get_post_meta( $post_id, 'ea_event_name', true );
- break;
-
- case 'mep_atten' :
- echo '
Attendees List';
- break;
-
- }
-}
-
-function mep_disable_new_posts() {
-// Hide sidebar link
- global $submenu;
- unset($submenu['edit.php?post_type=mep_events_attendees'][10]);
-// // Hide link on listing page
- if (isset($_GET['post_type']) && $_GET['post_type'] == 'mep_events_attendees') {
- echo '';
- }
-}
-add_action('admin_menu', 'mep_disable_new_posts');
-
-
function mep_load_events_templates($template) {
global $post;
@@ -1053,4 +842,15 @@ return $gn_price;
function mep_get_label($pid,$label_id,$default_text){
return mep_get_option( $label_id, 'label_setting_sec', $default_text);
+}
+
+// Add the custom columns to the book post type:
+add_filter( 'manage_mep_events_posts_columns', 'mep_set_custom_edit_event_columns' );
+function mep_set_custom_edit_event_columns($columns) {
+
+ unset( $columns['date'] );
+
+ $columns['mep_status'] = __( 'Status', 'mage-eventpress' );
+
+ return $columns;
}
\ No newline at end of file