update readme text file

This commit is contained in:
magepeopleteam 2018-12-02 07:22:21 +00:00
parent b12de90ea6
commit 4c03435d54
3 changed files with 9 additions and 5 deletions

View File

@ -181,7 +181,7 @@ if(isset($_POST['mep_event_ticket_type'])){
$cart_item_data['event_tp'] = $tp; $cart_item_data['event_tp'] = $tp;
$cart_item_data['line_total'] = $tp; $cart_item_data['line_total'] = $tp;
$cart_item_data['line_subtotal'] = $tp; $cart_item_data['line_subtotal'] = $tp;
$cart_item_data['event_id'] = $product_id;
@ -195,11 +195,13 @@ add_action( 'woocommerce_before_calculate_totals', 'add_custom_price' );
function add_custom_price( $cart_object ) { function add_custom_price( $cart_object ) {
foreach ( $cart_object->cart_contents as $key => $value ) { foreach ( $cart_object->cart_contents as $key => $value ) {
$eid = $value['event_id'];
if (get_post_type($eid) == 'mep_events') {
$cp = $value['event_tp']; $cp = $value['event_tp'];
$value['data']->set_price($cp); $value['data']->set_price($cp);
$new_price = $value['data']->get_price(); $new_price = $value['data']->get_price();
} }
}
} }
@ -234,6 +236,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 ) { function mep_add_custom_fields_text_to_order_items( $item, $cart_item_key, $values, $order ) {
$eid = $values['event_id'];
if (get_post_type($eid) == 'mep_events') {
$mep_events_extra_prices = $values['event_extra_option']; $mep_events_extra_prices = $values['event_extra_option'];
$event_user_info = $values['event_user_info']; $event_user_info = $values['event_user_info'];
$event_ticket_type = $values['event_ticket_type']; $event_ticket_type = $values['event_ticket_type'];
@ -275,6 +279,6 @@ update_post_meta( $product_id, "mep_xtra_$tck_name",$ntesqt);
$item->add_meta_data('_event_user_info',$event_user_info); $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 ); add_action( 'woocommerce_checkout_create_order_line_item', 'mep_add_custom_fields_text_to_order_items', 10, 4 );

View File

@ -248,6 +248,6 @@ You can display the event list on any page by using the ShortCode. Just use this
*= 2.2.0 = *= 2.2.0 =
*Update Release, Fixed no numeric error, and add feature to hide available seat count. 29 Nov 2018* *Update Release, Fixed no numeric error, and add feature to hide available seat count. 29 Nov 2018*
*= 2.2.1 = *= 2.2.1 & 2.2.2 =
*Update Release, fixed cart wrong calculation issue. 02 Dec 2018* *Update Release, fixed cart wrong calculation issue. 02 Dec 2018*

View File

@ -3,7 +3,7 @@
* Plugin Name: Woocommerce Events Manager * Plugin Name: Woocommerce Events Manager
* Plugin URI: http://mage-people.com * Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople.. * Description: A Complete Event Solution for WordPress by MagePeople..
* Version: 2.2.1 * Version: 2.2.2
* Author: MagePeople Team * Author: MagePeople Team
* Author URI: http://www.mage-people.com/ * Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress * Text Domain: mage-eventpress