diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php
index f3285ed..9465888 100644
--- a/inc/mep_extra_price.php
+++ b/inc/mep_extra_price.php
@@ -1,7 +1,7 @@
cart_contents as $key => $value ) {
$cp = $value['event_tp'];
$value['data']->set_price($cp);
@@ -202,6 +204,7 @@ function add_custom_price( $cart_object ) {
}
}
+}
@@ -209,6 +212,8 @@ function add_custom_price( $cart_object ) {
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 "
";
@@ -226,6 +231,7 @@ if(array_key_exists('event_ticket_type', $cart_item)){
echo "- Ticket: ".$cart_item['event_ticket_type']." x ".$cart_item['event_ticket_qty'].": ".get_woocommerce_currency_symbol().$cart_item['event_ticket_price']."
";
}
echo "
";
+ }
return $item_data;
}
@@ -235,6 +241,8 @@ 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'];
@@ -275,7 +283,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
diff --git a/readme.txt b/readme.txt
index e4ee3c4..60a2ea4 100644
--- a/readme.txt
+++ b/readme.txt
@@ -246,4 +246,8 @@ You can display the event list on any page by using the ShortCode. Just use this
*Update Release, Custom email sending issue has been fixed. 28 Nov 2018*
*= 2.2.0 =
-*Update Release, Fixed no numeric error, and add feature to hide available seat count. 29 Nov 2018*
\ No newline at end of file
+*Update Release, Fixed no numeric error, and add feature to hide available seat count. 29 Nov 2018*
+
+*= 2.2.1 =
+*Update Release, fixed cart wrong calculation issue. 02 Dec 2018*
+
diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php
index 470ad7b..8609f0b 100644
--- a/woocommerce-event-press.php
+++ b/woocommerce-event-press.php
@@ -3,7 +3,7 @@
* Plugin Name: Woocommerce Events Manager
* Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople..
-* Version: 2.2.0
+* Version: 2.2.1
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress