From 5d2695c04726f8cfdd2dedb249e49e5752b0daa8 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Fri, 2 Dec 2022 04:54:20 +0000 Subject: [PATCH] function update --- inc/mep_functions.php | 45 ++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/inc/mep_functions.php b/inc/mep_functions.php index bc8bb31..fbf9ec8 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -740,7 +740,9 @@ function mep_check_attendee_exist_before_create($order_id, $event_id, $date ='') if(!class_exists( 'RP_SUB' )){ if(!class_exists( 'Afterpay_Plugin' )){ if(!class_exists( 'WC_Subscriptions' )){ - $woocommerce->cart->empty_cart(); + if ( !is_plugin_active( 'woo-juno/main.php' )){ + $woocommerce->cart->empty_cart(); + } } } } @@ -2396,40 +2398,44 @@ if (!function_exists('mep_wc_price')) { if (!function_exists('mep_get_event_total_seat')) { function mep_get_event_total_seat($event_id, $m = null, $t = null) { - $upcoming_date = !empty($m) && !empty(mep_get_event_upcoming_date($event_id)) ? mep_get_event_upcoming_date($event_id) : ''; + $upcoming_date = !empty($m) && !empty(mep_get_event_upcoming_date($event_id)) ? mep_get_event_upcoming_date($event_id) : ''; $total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($event_id, 'total'), $event_id); $total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($event_id, 'resv'), $event_id); $total_sold = mep_get_event_total_seat_left($event_id, $upcoming_date); //$total_sold = mep_ticket_type_sold($event_id); - + $recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no'; $total_left = (int) $total_seat - ((int) $total_sold + (int) $total_resv); $event_date = date('Y-m-d H:i', strtotime(mep_get_event_upcoming_date($event_id))); ob_start(); - if ($t == 'multi') { + if ($recurring != 'no') { $total = (int)$total_seat * (int)$m; $sold = $total - ($total_sold + $total_resv); $available = $total - $sold; ?> - - - + + + + + + - - - + + + + + +