From 9f9d4c08fab165d899682ea04d2f5bfca100b387 Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Tue, 14 Dec 2021 05:33:15 +0000 Subject: [PATCH] location in cart issue fixed --- inc/mep_extra_price.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index d0331a7..1b161ab 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -49,7 +49,7 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $ $total_price = get_post_meta($product_id, '_price', true); $form_position = mep_get_option('mep_user_form_position', 'general_attendee_sec', 'details_page'); $mep_event_start_date = isset($_POST['mep_event_start_date']) ? mage_array_strip($_POST['mep_event_start_date']) : array(); - $event_cart_location = isset($_POST['mep_event_location_cart']) ? mage_array_strip($_POST['mep_event_location_cart']) : array(); + $event_cart_location = isset($_POST['mep_event_location_cart']) ? sanitize_text_field($_POST['mep_event_location_cart']) : array(); $event_cart_date = isset($_POST['mep_event_date_cart']) ? mage_array_strip($_POST['mep_event_date_cart']) : array(); $recurring_event_date = $recurring == 'yes' && isset($_POST['recurring_event_date']) ? mage_array_strip($_POST['recurring_event_date']) : array(); $ticket_type_arr = mep_cart_ticket_type('ticket_type', $total_price, $product_id); @@ -59,6 +59,7 @@ 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 */