fix date showing issue
This commit is contained in:
parent
ab3bfb799f
commit
07b4abc7e3
|
@ -10,7 +10,8 @@
|
|||
function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $variation_id)
|
||||
{
|
||||
|
||||
$product_id = get_post_meta($product_id, 'link_mep_event', true) ? get_post_meta($product_id, 'link_mep_event', true) : $product_id;
|
||||
$linked_event_id = get_post_meta($product_id, 'link_mep_event', true) ? get_post_meta($product_id, 'link_mep_event', true) : $product_id;
|
||||
$product_id = mep_product_exists($linked_event_id) ? $linked_event_id : $product_id;
|
||||
$recurring = get_post_meta($product_id, 'mep_enable_recurring', true) ? get_post_meta($product_id, 'mep_enable_recurring', true) : 'no';
|
||||
|
||||
if (get_post_type($product_id) == 'mep_events') {
|
||||
|
@ -30,7 +31,6 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
|
|||
$user = $form_position == 'details_page' ? mep_save_attendee_info_into_cart($product_id) : array();
|
||||
$validate = mep_cart_ticket_type('validation_data', $total_price,$product_id);
|
||||
|
||||
|
||||
/**
|
||||
* Now Store the datas into Cart Session
|
||||
*/
|
||||
|
@ -100,28 +100,24 @@ $hide_date_status = mep_get_option('mep_hide_date_from_order_page', 'general_se
|
|||
|
||||
if ($recurring == 'yes') {
|
||||
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0 && sizeof($user_info) == 0) {
|
||||
|
||||
foreach ($ticket_type_arr as $_event_recurring_date) {
|
||||
if($hide_date_status == 'no'){
|
||||
?>
|
||||
<li><?php _e('Event Date', 'mage-eventpress'); ?>: <?php echo $cart_item['event_cart_date']; ?></li>
|
||||
<li><?php _e('Event Date', 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'],'date-text'); ?></li>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($user_info) && sizeof($user_info) > 0) {
|
||||
echo '<li>';
|
||||
echo mep_cart_display_user_list($user_info);
|
||||
echo '</li>';
|
||||
}
|
||||
} else {
|
||||
|
||||
if (is_array($user_info) && sizeof($user_info) > 0) {
|
||||
echo '<li>';
|
||||
echo mep_cart_display_user_list($user_info);
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '</li>';
|
||||
} else {
|
||||
if($hide_date_status == 'no'){
|
||||
|
@ -132,8 +128,7 @@ $hide_date_status = mep_get_option('mep_hide_date_from_order_page', 'general_se
|
|||
}
|
||||
}
|
||||
if($hide_location_status == 'no'){
|
||||
?>
|
||||
|
||||
?>
|
||||
<li><?php _e('Event Location', 'mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; ?></li>
|
||||
<?php
|
||||
}
|
||||
|
|
|
@ -2597,6 +2597,8 @@ function mep_cart_ticket_type($type,$total_price,$product_id){
|
|||
$price = isset($_POST['option_price']) ? $_POST['option_price'] : array();
|
||||
$count = count( $names );
|
||||
$ticket_type_arr = [];
|
||||
|
||||
|
||||
$vald = 0;
|
||||
if(sizeof($names) > 0){
|
||||
for ( $i = 0; $i < $count; $i++ ) {
|
||||
|
@ -2863,4 +2865,8 @@ function mep_single_page_script(){
|
|||
</script>
|
||||
<?php
|
||||
echo ob_get_clean();
|
||||
}
|
||||
|
||||
function mep_product_exists( $id ) {
|
||||
return is_string( get_post_status( $id ) );
|
||||
}
|
Loading…
Reference in New Issue