function update
This commit is contained in:
parent
8676f992ee
commit
5d2695c047
|
@ -740,12 +740,14 @@ function mep_check_attendee_exist_before_create($order_id, $event_id, $date ='')
|
||||||
if(!class_exists( 'RP_SUB' )){
|
if(!class_exists( 'RP_SUB' )){
|
||||||
if(!class_exists( 'Afterpay_Plugin' )){
|
if(!class_exists( 'Afterpay_Plugin' )){
|
||||||
if(!class_exists( 'WC_Subscriptions' )){
|
if(!class_exists( 'WC_Subscriptions' )){
|
||||||
|
if ( !is_plugin_active( 'woo-juno/main.php' )){
|
||||||
$woocommerce->cart->empty_cart();
|
$woocommerce->cart->empty_cart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // end of check post type
|
} // 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_get_event_total_seat_left($event_id, $upcoming_date);
|
||||||
//$total_sold = mep_ticket_type_sold($event_id);
|
//$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);
|
$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)));
|
$event_date = date('Y-m-d H:i', strtotime(mep_get_event_upcoming_date($event_id)));
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
if ($t == 'multi') {
|
if ($recurring != 'no') {
|
||||||
$total = (int)$total_seat * (int)$m;
|
$total = (int)$total_seat * (int)$m;
|
||||||
$sold = $total - ($total_sold + $total_resv);
|
$sold = $total - ($total_sold + $total_resv);
|
||||||
$available = $total - $sold;
|
$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
|
<?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);
|
$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);
|
echo apply_filters('mep_event_seat_status_text', $seat_count_var, $total, $available, $sold);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
|
<?php //do_action('mep_after_seat_stat_info',$event_id); ?>
|
||||||
|
</span>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} 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
|
<?php
|
||||||
// $sold = ($total_seat - $total_left);
|
// $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);
|
$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);
|
echo apply_filters('mep_event_seat_status_text', $seat_count_var, $total_seat, $total_sold, $total_left);
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
|
<?php do_action('mep_after_seat_stat_info',$event_id); ?>
|
||||||
|
</span>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
|
@ -5313,7 +5319,6 @@ jQuery(document).on('change', '.mep_global_time_format', function () {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue