function update

This commit is contained in:
magepeopleteam 2022-12-02 04:54:20 +00:00
parent 8676f992ee
commit 5d2695c047
1 changed files with 25 additions and 20 deletions

View File

@ -740,12 +740,14 @@ 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' )){
if ( !is_plugin_active( 'woo-juno/main.php' )){
$woocommerce->cart->empty_cart();
}
}
}
}
}
}
} // end of check post type
@ -2402,34 +2404,38 @@ if (!function_exists('mep_get_event_total_seat')) {
$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;
?>
<span style="background: #dc3232;color: #fff;padding: 5px 10px;">
<span style="background: #dc3232;color: #fff;padding: 5px 10px; display:block">
<span class="mep_seat_stat_info_<?php echo $event_id; ?>">
<?php
$seat_count_var = apply_filters('mep_event_total_seat_counts', $total, $event_id) . ' - ' . apply_filters('mep_event_total_seat_sold', $available, $event_id, $event_date) . ' = ' . apply_filters('mep_event_total_seat_left', $sold, $event_id, '', $event_date);
echo apply_filters('mep_event_seat_status_text', $seat_count_var, $total, $available, $sold);
?>
</span>
<?php //do_action('mep_after_seat_stat_info',$event_id); ?>
</span>
<?php
} else {
?>
<span style="background: #dc3232;color: #fff;padding: 5px 10px;">
<span style="background: #dc3232;color: #fff;padding: 5px 10px; display:block">
<span class="mep_seat_stat_info_<?php echo $event_id; ?>">
<?php
// $sold = ($total_seat - $total_left);
$seat_count_var = apply_filters('mep_event_total_seat_counts', $total_seat, $event_id) . ' - ' . apply_filters('mep_event_total_seat_sold', $total_sold, $event_id, $event_date) . ' = ' . apply_filters('mep_event_total_seat_left', $total_left, $event_id, '', $event_date);
echo apply_filters('mep_event_seat_status_text', $seat_count_var, $total_seat, $total_sold, $total_left);
?>
</span>
<?php do_action('mep_after_seat_stat_info',$event_id); ?>
</span>
<?php
}
return ob_get_clean();
@ -5313,7 +5319,6 @@ jQuery(document).on('change', '.mep_global_time_format', function () {
return false;
});
</script>
<?php
}