From c16a062a201a73e3a912b9934c714c1a7db75998 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Mon, 23 Nov 2020 10:59:45 +0000 Subject: [PATCH] file update --- inc/admin_setting_panel.php | 4 ++-- inc/mep_extra_price.php | 15 ++++++++------- inc/template-prts/event_date.php | 10 +++++----- templates/list/default.php | 7 ++++--- templates/themes/default-theme.php | 2 +- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/inc/admin_setting_panel.php b/inc/admin_setting_panel.php index 3bad0b0..8c85e4b 100644 --- a/inc/admin_setting_panel.php +++ b/inc/admin_setting_panel.php @@ -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' => '' ), diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index 70ec2e6..4d6954b 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -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); diff --git a/inc/template-prts/event_date.php b/inc/template-prts/event_date.php index 13dfcc7..25571e0 100755 --- a/inc/template-prts/event_date.php +++ b/inc/template-prts/event_date.php @@ -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) { ?> -

+

-

+

@@ -8,8 +9,8 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
-
-
+
+
0) { ?> @@ -78,7 +79,7 @@ $mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text
  • diff --git a/templates/themes/default-theme.php b/templates/themes/default-theme.php index e783c8f..5e0f569 100644 --- a/templates/themes/default-theme.php +++ b/templates/themes/default-theme.php @@ -42,7 +42,7 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general

    - +