readme updated

This commit is contained in:
magepeopleteam 2019-12-16 10:47:21 +00:00
parent 0541f20369
commit 5853047cdc
1 changed files with 24 additions and 30 deletions

View File

@ -891,19 +891,24 @@ function mep_attendee_filter_query($query) {
$q_vars['meta_key'] = 'ea_event_id'; $q_vars['meta_key'] = 'ea_event_id';
$q_vars['meta_value'] = $_GET['meta_value']; $q_vars['meta_value'] = $_GET['meta_value'];
} }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'],
if ( $pagenow == 'edit.php' && isset($_GET['post_type']) && $_GET['post_type'] == $post_type && isset($_GET['event_id']) && $_GET['event_id'] != 0 ) { 'compare' => '='
],[
$q_vars['meta_key'] = 'ea_event_id'; 'key' => 'ea_event_date',
$q_vars['meta_value'] = $_GET['event_id']; 'value' => $event_date,
'compare' => 'LIKE'
$q_vars['meta_key'] = 'ea_event_date'; ],[
$q_vars['meta_value'] = $_GET['ea_event_date']; '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(); $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'; $recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no';
// print_r($multi_date); // print_r($multi_date);
// if($recurring == 'yes'){
?> ?>
<form action="" method="get"> <form action="" method="get">
<select name="ea_event_date" id="" style='font-size: 14px;border: 1px solid blue;width: 110px;display:<?php if($recurring == 'yes'){ echo 'block'; }else{ echo 'none'; } ?>'> <select name="ea_event_date" id="" style='font-size: 14px;border: 1px solid blue;width: 110px;display:<?php if($recurring == 'yes'){ echo 'block'; }else{ echo 'none'; } ?>'>
@ -953,7 +959,9 @@ switch ( $column ) {
<button class="button button-primary button-large">Attendees List</button> <button class="button button-primary button-large">Attendees List</button>
</form> </form>
<?php <?php
// echo '<button class="button button-primary button-large" href="'.get_site_url().'/wp-admin/edit.php?post_type=mep_events_attendees&meta_value='.$post_id.'">Attendees List</button></form>'; // }else{
// echo '<a class="button button-primary button-large" href="'.get_site_url().'/wp-admin/edit.php?post_type=mep_events_attendees&meta_value='.$post_id.'">Attendees List</a></form>';
// }
break; 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') { 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([ $tax_query = array([
'taxonomy' => 'product_visibility', 'taxonomy' => 'product_visibility',
'field' => 'slug', 'field' => 'slug',
'terms' => 'exclude-from-catalog', 'terms' => 'exclude-from-catalog',
'operator' => 'NOT IN', 'operator' => 'NOT IN',
]); ]);
$query->set( 'tax_query', $tax_query ); $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{ }else{
function mep_admin_notice_wc_not_active() { function mep_admin_notice_wc_not_active() {
$class = 'notice notice-error'; $class = 'notice notice-error';