file update
This commit is contained in:
parent
2efd363f38
commit
c16a062a20
|
@ -522,7 +522,7 @@ if (!class_exists('MAGE_Events_Setting_Controls')) :
|
|||
array(
|
||||
'name' => 'mep_location_text',
|
||||
'label' => __('Location:', 'mage-eventpress'),
|
||||
'desc' => __('Enter the text which you want to display as Location in event list page.', 'mage-eventpress'),
|
||||
'desc' => __('Enter the text which you want to display as Location in event list page & Order Confirmation Page.', 'mage-eventpress'),
|
||||
'type' => 'text',
|
||||
'default' => ''
|
||||
),
|
||||
|
@ -543,7 +543,7 @@ if (!class_exists('MAGE_Events_Setting_Controls')) :
|
|||
array(
|
||||
'name' => 'mep_event_date_text',
|
||||
'label' => __('Event Date:', 'mage-eventpress'),
|
||||
'desc' => __('Enter the text which you want to display as Event Date in event list page.', 'mage-eventpress'),
|
||||
'desc' => __('Enter the text which you want to display as Event Date in event list page & Order Confirmation Page', 'mage-eventpress'),
|
||||
'type' => 'text',
|
||||
'default' => ''
|
||||
),
|
||||
|
|
|
@ -14,9 +14,9 @@ if (!defined('ABSPATH')) {
|
|||
function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $variation_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';
|
||||
$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') {
|
||||
/**
|
||||
|
@ -218,7 +218,8 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
|
|||
{
|
||||
|
||||
$eid = array_key_exists('event_id', $values) ? $values['event_id'] : 0; //$values['event_id'];
|
||||
|
||||
$location_text = mep_get_option('mep_location_text', 'label_setting_sec', __('Location', 'mage-eventpress'));;
|
||||
$date_text = mep_get_option('mep_event_date_text', 'label_setting_sec', __('Date', 'mage-eventpress'));;
|
||||
if (get_post_type($eid) == 'mep_events') {
|
||||
$mep_events_extra_prices = $values['event_extra_option'];
|
||||
$cart_location = $values['event_cart_location'];
|
||||
|
@ -232,11 +233,11 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
|
|||
if ($recurring == 'yes') {
|
||||
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
|
||||
foreach ($ticket_type_arr as $_event_recurring_date) {
|
||||
$item->add_meta_data('Date', get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'));
|
||||
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$item->add_meta_data('Date',$cart_date);
|
||||
$item->add_meta_data($date_text,$cart_date);
|
||||
}
|
||||
|
||||
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
|
||||
|
@ -253,7 +254,7 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
|
|||
}
|
||||
}
|
||||
|
||||
$item->add_meta_data('Location', $cart_location);
|
||||
$item->add_meta_data($location_text, $cart_location);
|
||||
$item->add_meta_data('_event_ticket_info', $ticket_type_arr);
|
||||
$item->add_meta_data('_event_user_info', $event_user_info);
|
||||
$item->add_meta_data('_event_service_info', $mep_events_extra_prices);
|
||||
|
|
|
@ -167,7 +167,7 @@ if (!function_exists('mep_ev_date')) {
|
|||
|
||||
|
||||
if ($recurring == 'yes') {
|
||||
$event_more_dates = get_post_meta(get_the_id(), 'mep_event_more_date', true);
|
||||
$event_more_dates = get_post_meta(get_the_id(), 'mep_event_more_date', true) ? get_post_meta(get_the_id(), 'mep_event_more_date', true) : [];
|
||||
foreach ($event_more_dates as $md) {
|
||||
$more_date[] = $md['event_more_start_date'] . ' ' . $md['event_more_start_time'];
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ if (!function_exists('mep_ev_date')) {
|
|||
|
||||
add_action('mep_event_time_only', 'mep_ev_time');
|
||||
if (!function_exists('mep_ev_time')) {
|
||||
function mep_ev_time()
|
||||
function mep_ev_time($event_id)
|
||||
{
|
||||
global $event_meta;
|
||||
$start_datetime = $event_meta['event_start_date'][0] . ' ' . $event_meta['event_start_time'][0];
|
||||
|
@ -213,7 +213,7 @@ if (!function_exists('mep_ev_time')) {
|
|||
|
||||
|
||||
if ($recurring == 'yes') {
|
||||
$event_more_dates = get_post_meta(get_the_id(), 'mep_event_more_date', true);
|
||||
$event_more_dates = get_post_meta(get_the_id(), 'mep_event_more_date', true) ? get_post_meta(get_the_id(), 'mep_event_more_date', true) : [];
|
||||
foreach ($event_more_dates as $md) {
|
||||
$more_date[] = $md['event_more_start_date'] . ' ' . $md['event_more_start_time'];
|
||||
}
|
||||
|
@ -227,7 +227,7 @@ if (!function_exists('mep_ev_time')) {
|
|||
}
|
||||
if ($cn == $cnt) {
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($ev_date, 'time'); ?> </p>
|
||||
<p><?php echo apply_filters('mep_event_details_only_time',get_mep_datetime($ev_date, 'time'),$event_id); ?> </p>
|
||||
<?php
|
||||
$cn++;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ if (!function_exists('mep_ev_time')) {
|
|||
}
|
||||
} else {
|
||||
?>
|
||||
<p><?php echo get_mep_datetime($start_datetime, 'time'); ?></p>
|
||||
<p><?php echo apply_filters('mep_event_details_only_time',get_mep_datetime($start_datetime, 'time'),$event_id); ?></p>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
|
||||
$mep_hide_event_hover_btn = mep_get_option('mep_hide_event_hover_btn', 'general_setting_sec', 'no');
|
||||
$mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text', 'general_setting_sec', 'Book Now');
|
||||
?>
|
||||
|
@ -8,8 +9,8 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
|
|||
<a href="<?php echo get_the_permalink($event_id); ?>"><?php mep_get_list_thumbnail($event_id); ?></a>
|
||||
<?php if (sizeof($event_multidate) == 0) { ?>
|
||||
<div class="mep-ev-start-date">
|
||||
<div class="mep-day"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'day'); ?></div>
|
||||
<div class="mep-month"><?php echo get_mep_datetime($event_meta['event_start_datetime'][0], 'month'); ?></div>
|
||||
<div class="mep-day"><?php echo apply_filters('mep_event_list_only_day_number',get_mep_datetime($event_meta['event_start_datetime'][0], 'day'),$event_id); ?></div>
|
||||
<div class="mep-month"><?php echo apply_filters('mep_event_list_only_month_name',get_mep_datetime($event_meta['event_start_datetime'][0], 'month'),$event_id); ?></div>
|
||||
</div>
|
||||
<?php }
|
||||
if (is_array($event_multidate) && sizeof($event_multidate) > 0) { ?>
|
||||
|
@ -78,7 +79,7 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
|
|||
</li>
|
||||
<?php }
|
||||
}
|
||||
if ($hide_time_list == 'no') {
|
||||
if ($hide_time_list == 'no' && $recurring == 'no') {
|
||||
if (strtotime(current_time('Y-m-d H:i')) < strtotime($event_meta['event_start_datetime'][0])) {
|
||||
?>
|
||||
<li class="mep_list_event_date">
|
||||
|
|
|
@ -42,7 +42,7 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
|
|||
<h3>
|
||||
<?php echo mep_get_option('mep_event_time_text', 'label_setting_sec') ? mep_get_option('mep_event_time_text', 'label_setting_sec') : _e('Event Time:', 'mage-eventpress'); ?>
|
||||
</h3>
|
||||
<?php do_action('mep_event_time_only'); ?>
|
||||
<?php do_action('mep_event_time_only',get_the_id()); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php }
|
||||
|
|
Loading…
Reference in New Issue