From b12de90ea68b0edbfe70fcd58bc357f0140b736c Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Sun, 2 Dec 2018 05:45:21 +0000 Subject: [PATCH] update cart page --- inc/mep_extra_price.php | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index 9465888..4277b94 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -1,8 +1,7 @@ cart_contents as $key => $value ) { $cp = $value['event_tp']; $value['data']->set_price($cp); @@ -204,7 +201,6 @@ if($eid != 'not-event'){ } } -} @@ -212,8 +208,6 @@ if($eid != 'not-event'){ function mep_display_custom_fields_text_cart( $item_data, $cart_item ) { $mep_events_extra_prices = $cart_item['event_extra_option']; -$eid = $cart_item['event_id']; -if($eid != 'not-event'){ if($mep_events_extra_prices){ echo ""; - } return $item_data; } @@ -241,8 +234,6 @@ add_filter( 'woocommerce_get_item_data', 'mep_display_custom_fields_text_cart', function mep_add_custom_fields_text_to_order_items( $item, $cart_item_key, $values, $order ) { -$eid = $values['event_id']; -if($eid != 'not-event'){ $mep_events_extra_prices = $values['event_extra_option']; $event_user_info = $values['event_user_info']; $event_ticket_type = $values['event_ticket_type']; @@ -283,7 +274,7 @@ update_post_meta( $product_id, "mep_xtra_$tck_name",$ntesqt); $item->add_meta_data('_event_user_info',$event_user_info); -} + } add_action( 'woocommerce_checkout_create_order_line_item', 'mep_add_custom_fields_text_to_order_items', 10, 4 ); \ No newline at end of file