diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php index 8ee9f79..5f47631 100644 --- a/woocommerce-event-press.php +++ b/woocommerce-event-press.php @@ -891,19 +891,24 @@ function mep_attendee_filter_query($query) { $q_vars['meta_key'] = 'ea_event_id'; $q_vars['meta_value'] = $_GET['meta_value']; - } - - - - - - if ( $pagenow == 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] == $post_type && isset($_GET['event_id']) && $_GET['event_id'] != 0 ) { - - $q_vars['meta_key'] = 'ea_event_id'; - $q_vars['meta_value'] = $_GET['event_id']; - - $q_vars['meta_key'] = 'ea_event_date'; - $q_vars['meta_value'] = $_GET['ea_event_date']; + }elseif ( $pagenow == 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] == $post_type && isset($_GET['event_id']) && $_GET['event_id'] != 0 && !isset($_GET['action']) ) { + + $event_date = date('Y-m-d',strtotime($_GET['ea_event_date'])); + $meta_query = array([ + 'key' => 'ea_event_id', + 'value' => $_GET['event_id'], + 'compare' => '=' + ],[ + 'key' => 'ea_event_date', + 'value' => $event_date, + 'compare' => 'LIKE' + ],[ + 'key' => 'ea_order_status', + 'value' => 'completed', + 'compare' => '=' + ]); + + $query->set( 'meta_query', $meta_query ); } } @@ -940,6 +945,7 @@ switch ( $column ) { $multi_date = get_post_meta($post_id,'mep_event_more_date',true) ? get_post_meta($post_id,'mep_event_more_date',true) : array(); $recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no'; // print_r($multi_date); + // if($recurring == 'yes'){ ?>
Attendees List'; + // }else{ + // echo 'Attendees List'; + // } break; } } @@ -2192,20 +2200,15 @@ function product_tags_sorting_query($query) { if ( $pagenow == 'edit.php' && isset($q_vars['post_type']) && $q_vars['post_type'] == 'product') { - $term = get_term_by('id', $q_vars[$taxonomy], $taxonomy); + // $term = get_term_by('id', $q_vars[$taxonomy], $taxonomy); $tax_query = array([ 'taxonomy' => 'product_visibility', 'field' => 'slug', 'terms' => 'exclude-from-catalog', 'operator' => 'NOT IN', - ]); - + ]); $query->set( 'tax_query', $tax_query ); - - - // $q_vars[$taxonomy] = 'exclude-from-catalog'; - } } @@ -2334,15 +2337,6 @@ echo $content = ob_get_clean(); } -function mep_email_set_content_type(){ - return "text/html"; -} -add_filter( 'wp_mail_content_type','mep_email_set_content_type' ); - - - - - }else{ function mep_admin_notice_wc_not_active() { $class = 'notice notice-error';