diff --git a/inc/template-prts/event_add_cart.php b/inc/template-prts/event_add_cart.php index c32fb53..801efd1 100755 --- a/inc/template-prts/event_add_cart.php +++ b/inc/template-prts/event_add_cart.php @@ -51,9 +51,9 @@ if (!function_exists('mep_get_event_reg_btn')) { $mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array(); $total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($post_id, 'total'), $post_id); $total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($post_id, 'resv'), $post_id); - - // $upcoming_date = !empty(mep_get_event_upcoming_date($post_id)) ? mep_get_event_upcoming_date($post_id) : ''; - $upcoming_date = ''; + $recurring = get_post_meta($post_id, 'mep_enable_recurring', true) ? get_post_meta($post_id, 'mep_enable_recurring', true) : 'no'; + $_upcoming_date = !empty(mep_get_event_upcoming_date($post_id)) ? mep_get_event_upcoming_date($post_id) : ''; + $upcoming_date = $recurring == 'no' ? '' : $_upcoming_date; $total_sold = mep_get_event_total_seat_left($post_id, $upcoming_date); $total_left = $total_seat - ($total_sold + $total_resv); // $total_left = mep_get_event_total_seat_left($post_id, $upcoming_date);