functions update

This commit is contained in:
magepeopleteam 2021-06-10 11:41:06 +00:00
parent 7c218c5053
commit 898ba1e9e6
6 changed files with 188 additions and 51 deletions

View File

@ -363,6 +363,9 @@ div#mep_event_list_thumbnail_meta_boxes table td input#enable_global_qty {
padding: 10px;
min-height: 200px;
}
.wrap.mage_settings_panel_wrap #message {
display: none!important;
}
#wp-mep_event_cc_email_text-media-buttons button {width: auto !important;}
.wrap.mage_settings_panel_wrap #setting-error-tgmpa {order: 0;width: 100%;}
#mp_event_all_info_in_tab table.form-table {table-layout: inherit;}
@ -389,7 +392,7 @@ iframe#gmap_canvas {width: 100%; height: 300px;}
#mp_event_all_info_in_tab table th,
#mp_event_all_info_in_tab table td {border: 1px solid #DDD;width: inherit;min-width: 80px;vertical-align: middle;}
#mp_event_all_info_in_tab table td {padding: 5px;}
#mp_event_all_info_in_tab table button {width: 100%;}
#mp_event_all_info_in_tab table button { /* width: 100%; */ }
#mp_event_all_info_in_tab table button.remove-day-row,
#mp_event_all_info_in_tab table button.remove-faq-row {width: auto;}
#mp_event_all_info_in_tab table.mp_form_builder_table .mp_formControl {width: 100%;}

View File

@ -166,6 +166,9 @@ span.mep_warning {
border-bottom: 1px solid #ddd;
padding-bottom: 15px;
}
.mep_google_map {
height: 300px;
}
/******table*******/
.mep-events-wrapper table {width: 100%;table-layout: fixed;margin: 0 0 15px 0;}
.mep-events-wrapper table td {text-align:left;border-bottom: 1px solid #f0f0f0;padding: 10px;vertical-align: middle;font-size: 16px;font-weight: 500;}

View File

@ -364,9 +364,9 @@ class MP_Event_All_Info_In_One
var latitude = place.geometry.location.lat();
var longitude = place.geometry.location.lng();
$("input[name=coordinate]").val(address);
$("input[name=latitude]").val(latitude);
$("input[name=longitude]").val(longitude);
// $("input[name=coordinate]").val(address);
jQuery("input[name=latitude]").val(latitude);
jQuery("input[name=longitude]").val(longitude);
});
}
@ -471,7 +471,7 @@ class MP_Event_All_Info_In_One
<?php do_action('mep_add_extra_input_box', $field) ?>
<td>
<div class="sell_expire_date">
<input type="date" id="ticket_sale_start_date" class="mp_formControl" value='<?php if ( $field['option_sale_end_date_t'] != '' ) {
<input type="date" id="ticket_sale_start_date" class="mp_formControl" value='<?php if (array_key_exists('option_sale_end_date_t', $field) && $field['option_sale_end_date_t'] != '') {
echo esc_attr( date( 'Y-m-d', strtotime( $field['option_sale_end_date_t'] ) ) );
} ?>' name="option_sale_end_date[]"/>
</div>
@ -479,7 +479,7 @@ class MP_Event_All_Info_In_One
<td>
<div class="sell_expire_date">
<input type="time" id="ticket_sale_start_time" class="mp_formControl" value='<?php if ( $field['option_sale_end_date_t'] != '' ) {
<input type="time" id="ticket_sale_start_time" class="mp_formControl" value='<?php if (array_key_exists('option_sale_end_date_t', $field) && $field['option_sale_end_date_t'] != '') {
echo esc_attr( date( 'H:i', strtotime( $field['option_sale_end_date_t'] ) ) );
} ?>' name="option_sale_end_time[]"/>
</div>
@ -975,7 +975,7 @@ class MP_Event_All_Info_In_One
</label>
<p></p>
<label class="mp_event_virtual_type_des <?php echo ($event_type == 'online') ? 'active' : ''; ?>">
<textarea type="text" name="mp_event_virtual_type_des" placeholder="Description"><?php echo $description; ?></textarea>
<?php wp_editor( htmlspecialchars_decode($description), 'mp_event_virtual_type_des' ); ?>
<p class="event_meta_help_txt"><?php _e('Please Enter Your Virtual event joining details Information. these information will send to buyer with confirmation email.', 'mage-eventpress') ?></p>
</label>
</td>
@ -1400,7 +1400,7 @@ function mep_event_meta_save($post_id)
}
update_post_meta($pid, 'mep_member_only_event', $mep_event_member_type);
update_post_meta($pid, 'mep_event_type', $mep_event_type);
$mp_event_virtual_type_des = isset($_POST['mp_event_virtual_type_des']) ? strip_tags($_POST['mp_event_virtual_type_des']) : "";
$mp_event_virtual_type_des = isset($_POST['mp_event_virtual_type_des']) ? htmlspecialchars($_POST['mp_event_virtual_type_des']) : "";
update_post_meta($pid, 'mp_event_virtual_type_des', $mp_event_virtual_type_des);

View File

@ -264,6 +264,7 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
$location_text = mep_get_option('mep_location_text', 'label_setting_sec', __('Location', 'mage-eventpress')) ? mep_get_option('mep_location_text', 'label_setting_sec', __('Location', 'mage-eventpress')) : 'Location';
$date_text = mep_get_option('mep_event_date_text', 'label_setting_sec', __('Date', 'mage-eventpress')) ? mep_get_option('mep_event_date_text', 'label_setting_sec', __('Date', 'mage-eventpress')) : 'Date';
if (get_post_type($eid) == 'mep_events') {
$event_id = $eid;
$mep_events_extra_prices = $values['event_extra_option'];
$cart_location = $values['event_cart_location'];
$event_extra_service = $values['event_extra_service'];
@ -274,8 +275,19 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
$recurring = get_post_meta($eid, 'mep_enable_recurring', true) ? get_post_meta($eid, 'mep_enable_recurring', true) : 'no';
$event_label = mep_get_option('mep_event_label', 'general_setting_sec', 'Events');
$time_status = get_post_meta($eid, 'mep_disable_ticket_time', true) ? get_post_meta($eid, 'mep_disable_ticket_time', true) : 'no';
$name_lable = get_post_meta($event_id,'mep_name_label',true) ? get_post_meta($event_id,'mep_name_label',true) : __('Name', 'mage-eventpress');
$email_lable = get_post_meta($event_id,'mep_email_label',true) ? get_post_meta($event_id,'mep_email_label',true) : __('Email', 'mage-eventpress');
$phone_lable = get_post_meta($event_id,'mep_phone_label',true) ? get_post_meta($event_id,'mep_phone_label',true) : __('Phone', 'mage-eventpress');
$address_lable = get_post_meta($event_id,'mep_address_label',true) ? get_post_meta($event_id,'mep_address_label',true) : __('Address', 'mage-eventpress');
$tshirt_lable = get_post_meta($event_id,'mep_tshirt_label',true) ? get_post_meta($event_id,'mep_tshirt_label',true) : __('T-Shirt Size', 'mage-eventpress');
$gender_lable = get_post_meta($event_id,'mep_gender_label',true) ? get_post_meta($event_id,'mep_gender_label',true) : __('Gender', 'mage-eventpress');
$company_lable = get_post_meta($event_id,'mep_company_label',true) ? get_post_meta($event_id,'mep_company_label',true) : __('Company', 'mage-eventpress');
$desg_lable = get_post_meta($event_id,'mep_desg_label',true) ? get_post_meta($event_id,'mep_desg_label',true) : __('Designation', 'mage-eventpress');
$website_lable = get_post_meta($event_id,'mep_website_label',true) ? get_post_meta($event_id,'mep_website_label',true) : __('Website', 'mage-eventpress');
$veg_lable = get_post_meta($event_id,'mep_veg_label',true) ? get_post_meta($event_id,'mep_veg_label',true) : __('Vegetarian', 'mage-eventpress');
if($recurring == 'everyday' && $time_status == 'no'){
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
@ -300,16 +312,16 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
$custom_forms_id = mep_get_user_custom_field_ids($eid);
foreach ($event_user_info as $userinf) {
if ($userinf['user_name']) { $item->add_meta_data(__('Name', 'mage-eventpress'), $userinf['user_name']); }
if ($userinf['user_email']) { $item->add_meta_data(__('Email', 'mage-eventpress'), $userinf['user_email']); }
if ($userinf['user_phone']) { $item->add_meta_data(__('Phone', 'mage-eventpress'), $userinf['user_phone']); }
if ($userinf['user_address']) { $item->add_meta_data(__('Address', 'mage-eventpress'), $userinf['user_address']); }
if ($userinf['user_gender']) { $item->add_meta_data(__('Gender', 'mage-eventpress'), $userinf['user_gender']); }
if ($userinf['user_tshirtsize']) { $item->add_meta_data(__('T-Shirt Size', 'mage-eventpress'), $userinf['user_tshirtsize']); }
if ($userinf['user_company']) { $item->add_meta_data(__('Company', 'mage-eventpress'), $userinf['user_company']); }
if ($userinf['user_designation']) { $item->add_meta_data(__('Designation', 'mage-eventpress'), $userinf['user_designation']); }
if ($userinf['user_website']) { $item->add_meta_data(__('Website', 'mage-eventpress'), $userinf['user_website']); }
if ($userinf['user_vegetarian']) { $item->add_meta_data(__('Vegetarian', 'mage-eventpress'), $userinf['user_vegetarian']); }
if ($userinf['user_name']) { $item->add_meta_data(mep_get_reg_label($event_id,'Name'), $userinf['user_name']); }
if ($userinf['user_email']) { $item->add_meta_data(mep_get_reg_label($event_id,'Email'), $userinf['user_email']); }
if ($userinf['user_phone']) { $item->add_meta_data(mep_get_reg_label($event_id,'Phone'), $userinf['user_phone']); }
if ($userinf['user_address']) { $item->add_meta_data(mep_get_reg_label($event_id,'Address'), $userinf['user_address']); }
if ($userinf['user_gender']) { $item->add_meta_data(mep_get_reg_label($event_id,'Gender'), $userinf['user_gender']); }
if ($userinf['user_tshirtsize']) { $item->add_meta_data(mep_get_reg_label($event_id,'T-Shirt Size'), $userinf['user_tshirtsize']); }
if ($userinf['user_company']) { $item->add_meta_data(mep_get_reg_label($event_id,'Company'), $userinf['user_company']); }
if ($userinf['user_designation']) { $item->add_meta_data(mep_get_reg_label($event_id,'Designation'), $userinf['user_designation']); }
if ($userinf['user_website']) { $item->add_meta_data(mep_get_reg_label($event_id,'Website'), $userinf['user_website']); }
if ($userinf['user_vegetarian']) { $item->add_meta_data(mep_get_reg_label($event_id,'Vegetarian'), $userinf['user_vegetarian']); }
if(sizeof($custom_forms_id) > 0){
foreach($custom_forms_id as $key => $value){
$item->add_meta_data(__($key, 'mage-eventpress'), $userinf[$value]);

View File

@ -1111,7 +1111,7 @@ if (!function_exists('mep_load_events_templates')) {
return $template;
}
}
add_filter('single_template', 'mep_load_events_templates',90);
add_filter('single_template', 'mep_load_events_templates');
@ -1251,6 +1251,20 @@ if (!function_exists('mep_get_event_order_metadata')) {
function mep_ticket_lits_users(){
ob_start();
?>
<style>
.mep-vr-vs-content {
background: #fdfbfb;
border: 2px solid #ddd;
padding: 10px;
}
.mep-vr-vs-content h3 {
font-size: 16px;
font-weight: bold;
border-bottom: 1px dashed #ddd;
padding: 0 0 5px 0;
margin: 0 0 10px 0;
}
</style>
<div class="mep-user-ticket-list">
<table>
<tr>
@ -1263,30 +1277,56 @@ if (!function_exists('mep_get_event_order_metadata')) {
$args_search_qqq = array (
'post_type' => array( 'mep_events_attendees' ),
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'ea_user_id',
'value' => get_current_user_id()
)
)
);
'author__in'=> array(get_current_user_id()), //Authors's id's you like to include
'meta_query' => array(
array(
'key' => 'ea_order_status',
'value' => array('completed', 'processing'),
'compare' => 'IN'
)
)
);
$loop = new WP_Query( $args_search_qqq );
while ($loop->have_posts()) {
$loop->the_post();
$event_id = get_post_meta( get_the_id(), 'ea_event_id', true );
$event_id = get_post_meta( get_the_id(), 'ea_event_id', true );
$virtual_info = get_post_meta($event_id,'mp_event_virtual_type_des',true) ? get_post_meta($event_id,'mp_event_virtual_type_des',true) : '';
$event_meta = get_post_custom($event_id);
$time = strtotime($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
$time = strtotime($event_meta['event_expire_datetime'][0]);
$newformat = date('Y-m-d H:i:s',$time);
if ( strtotime(current_time('Y-m-d H:i:s')) < strtotime( $newformat ) ) {
?>
<tr>
<td><?php echo get_post_meta( get_the_id(), 'ea_name', true ); ?></td>
<td><?php echo get_post_meta( get_the_id(), 'ea_ticket_type', true ); ?></td>
<td><?php echo get_post_meta( get_the_id(), 'ea_event_name', true ); ?></td>
<td>
<?php echo get_post_meta( get_the_id(), 'ea_event_name', true ); if($virtual_info){ ?> <button id='mep_vr_view_btn_<?php echo get_the_id(); ?>' class='mep_view_vr_btn'><?php _e('View Virtual Info','mage-eventpress'); ?></button> <?php } ?>
<script>
jQuery(document).ready(function($){
jQuery('.mep_virtual_event_info_sec').hide();
// mep_view_vr_btn
$(document).on('click', '#mep_vr_view_btn_<?php echo get_the_id(); ?>', function() {
$('#mep_vr_view_sec_<?php echo get_the_id(); ?>').toggle(1000);
});
});
</script>
</td>
<?php do_action('mep_user_order_list_table_row',get_the_id()); ?>
</tr>
<?php
if($virtual_info){
?>
<tr id='mep_vr_view_sec_<?php echo get_the_id(); ?>' class='mep_virtual_event_info_sec' style='display:none'>
<td colspan='4'>
<div class='mep-vr-vs-content'>
<h3><?php _e('Virtual Event Information:','mage-eventpress'); ?></h3>
<?php echo htmlspecialchars_decode($virtual_info); ?>
</div>
</td>
</tr>
<?php
}
}
}
?>
@ -1298,6 +1338,7 @@ if (!function_exists('mep_get_event_order_metadata')) {
}
}
if (!function_exists('mep_event_template_name')) {
function mep_event_template_name(){
@ -1936,22 +1977,39 @@ if (!function_exists('mep_get_event_total_seat')) {
$total_resv = apply_filters( 'mep_event_total_resv_seat_count', mep_event_total_seat($event_id,'resv'), $event_id );
$total_sold = mep_ticket_sold($event_id);
$total_left = $total_seat - ($total_sold + $total_resv);
ob_start();
if($t=='multi'){
$total = $total_seat * $m;
$sold = $total - ($total_sold + $total_resv);
$available = $total - $sold;;
?>
<span style="background: #dc3232;color: #fff;padding: 5px 10px;">
<?php echo $total; ?> - <?php echo $available; ?> = <?php echo $sold; ?>
<?php
$seat_count_var = $total.' - '.$available.' = '.$sold;
echo apply_filters('mep_event_seat_status_text',$seat_count_var,$total,$available,$sold);
?>
</span>
<?php
}else{
?>
<span style="background: #dc3232;color: #fff;padding: 5px 10px;"> <?php echo $total_seat; ?> - <?php echo $total_seat - $total_left; ?> = <?php echo $total_left; ?> </span>
<span style="background: #dc3232;color: #fff;padding: 5px 10px;">
<?php
$sold = ($total_seat - $total_left);
$seat_count_var = $total_seat.' - '.($total_seat - $total_left).' = '.$total_left;
echo apply_filters('mep_event_seat_status_text',$seat_count_var,$total_seat,$sold,$total_left);
?>
</span>
<?php
}
return ob_get_clean();
}
}
@ -1996,11 +2054,10 @@ if (!function_exists('mep_reset_event_booking')) {
}
// Add the custom columns to the book post type:
add_filter( 'manage_mep_events_posts_columns', 'mep_set_custom_mep_events_columns' );
if (!function_exists('mep_set_custom_mep_events_columns')) {
function mep_set_custom_mep_events_columns($columns) {
$columns['mep_event_seat'] = __( 'Seats [ Total - Sold = Available ]', 'mage-eventpress' );
$columns['mep_event_seat'] = apply_filters('mep_seat_status_head_text',__( 'Seats [ Total - Sold = Available ]', 'mage-eventpress' ));
return $columns;
}
}
@ -2995,6 +3052,33 @@ return $form_id;
}
function mep_get_reg_label($event_id,$name=''){
if($name == 'Name'){
return get_post_meta($event_id,'mep_name_label',true) ? get_post_meta($event_id,'mep_name_label',true) : __('Name', 'mage-eventpress');
}elseif($name == 'Email'){
return get_post_meta($event_id,'mep_email_label',true) ? get_post_meta($event_id,'mep_email_label',true) : __('Email', 'mage-eventpress');
}elseif($name == 'Phone'){
return get_post_meta($event_id,'mep_phone_label',true) ? get_post_meta($event_id,'mep_phone_label',true) : __('Phone', 'mage-eventpress');
}elseif($name == 'Address'){
return get_post_meta($event_id,'mep_address_label',true) ? get_post_meta($event_id,'mep_address_label',true) : __('Address', 'mage-eventpress');
}elseif($name == 'T-Shirt Size'){
return get_post_meta($event_id,'mep_tshirt_label',true) ? get_post_meta($event_id,'mep_tshirt_label',true) : __('T-Shirt Size', 'mage-eventpress');
}elseif($name == 'Gender'){
return get_post_meta($event_id,'mep_gender_label',true) ? get_post_meta($event_id,'mep_gender_label',true) : __('Gender', 'mage-eventpress');
}elseif($name == 'Company'){
return get_post_meta($event_id,'mep_company_label',true) ? get_post_meta($event_id,'mep_company_label',true) : __('Company', 'mage-eventpress');
}elseif($name == 'Designation'){
return get_post_meta($event_id,'mep_desg_label',true) ? get_post_meta($event_id,'mep_desg_label',true) : __('Designation', 'mage-eventpress');
}elseif($name == 'Website'){
return get_post_meta($event_id,'mep_website_label',true) ? get_post_meta($event_id,'mep_website_label',true) : __('Website', 'mage-eventpress');
}elseif($name == 'Vegetarian'){
return get_post_meta($event_id,'mep_veg_label',true) ? get_post_meta($event_id,'mep_veg_label',true) : __('Vegetarian', 'mage-eventpress');
}else{
return null;
}
}
@ -3005,29 +3089,32 @@ $custom_forms_id = mep_get_user_custom_field_ids($event_id);
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$time_status = get_post_meta($event_id, 'mep_disable_ticket_time', true) ? get_post_meta($event_id, 'mep_disable_ticket_time', true) : 'no';
foreach ($user_info as $userinf) {
// echo 123;
?>
<ul>
<?php if ($userinf['user_name']) { ?> <li><?php _e('Name', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_name']) { ?> <li><?php echo mep_get_reg_label($event_id,'Name').": ";
echo $userinf['user_name']; ?></li> <?php } ?>
<?php if ($userinf['user_email']) { ?> <li><?php _e('Email', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_email']) { ?> <li><?php echo mep_get_reg_label($event_id,'Email').": ";
echo $userinf['user_email']; ?></li> <?php } ?>
<?php if ($userinf['user_phone']) { ?> <li><?php _e('Phone', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_phone']) { ?> <li><?php echo mep_get_reg_label($event_id,'Phone').": ";
echo $userinf['user_phone']; ?></li> <?php } ?>
<?php if ($userinf['user_address']) { ?> <li><?php _e('Address', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_address']) { ?> <li><?php echo mep_get_reg_label($event_id,'Address').": ";
echo $userinf['user_address']; ?></li> <?php } ?>
<?php if ($userinf['user_gender']) { ?> <li><?php _e('Gender', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_gender']) { ?> <li><?php echo mep_get_reg_label($event_id,'Gender').": ";
echo $userinf['user_gender']; ?></li> <?php } ?>
<?php if ($userinf['user_tshirtsize']) { ?> <li><?php _e('T-Shirt Size', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_tshirtsize']) { ?> <li><?php echo mep_get_reg_label($event_id,'T-Shirt Size').": ";
echo $userinf['user_tshirtsize']; ?></li> <?php } ?>
<?php if ($userinf['user_company']) { ?> <li><?php _e('Company', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_company']) { ?> <li><?php echo mep_get_reg_label($event_id,'Company').": ";
echo $userinf['user_company']; ?></li> <?php } ?>
<?php if ($userinf['user_designation']) { ?> <li><?php _e('Designation', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_designation']) { ?> <li><?php echo mep_get_reg_label($event_id,'Designation').": ";
echo $userinf['user_designation']; ?></li> <?php } ?>
<?php if ($userinf['user_website']) { ?> <li><?php _e('Website', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_website']) { ?> <li><?php echo mep_get_reg_label($event_id,'Website').": ";
echo $userinf['user_website']; ?></li> <?php } ?>
<?php if ($userinf['user_vegetarian']) { ?> <li><?php _e('Vegetarian', 'mage-eventpress'); echo ": ";
<?php if ($userinf['user_vegetarian']) { ?> <li><?php echo mep_get_reg_label($event_id,'Vegeratian').": ";
echo $userinf['user_vegetarian']; ?></li> <?php } ?>
<?php if(sizeof($custom_forms_id) > 0){
foreach($custom_forms_id as $key => $value){
@ -3066,8 +3153,8 @@ ob_start();
if (!function_exists('mep_cart_order_data_save_ticket_type')) {
function mep_cart_order_data_save_ticket_type($item,$ticket_type_arr,$eid){
foreach ($ticket_type_arr as $ticket) {
$ticket_type_name = $ticket['ticket_name'] . " - " . wc_price(mep_get_price_including_tax($eid,$ticket['ticket_price'])) . ' x ' . $ticket['ticket_qty'] . ' = ';
$ticket_type_val = wc_price(mep_get_price_including_tax($eid,(float) $ticket['ticket_price'] * (float) $ticket['ticket_qty']));
$ticket_type_name = $ticket['ticket_name'] . " - " . mep_get_price_including_tax($eid,(int) $ticket['ticket_price']) . ' x ' . $ticket['ticket_qty'] . ' = ';
$ticket_type_val = mep_get_price_including_tax($eid,(int) (float) $ticket['ticket_price'] * (float) $ticket['ticket_qty']);
$ticket_name_meta = apply_filters('mep_event_order_meta_ticket_name_filter',$ticket_type_name,$ticket);
$item->add_meta_data($ticket_name_meta, $ticket_type_val);
}
@ -3349,7 +3436,38 @@ function mep_elementor_get_tax_term( $tax ) {
function mep_get_price_excluding_tax( $event,$price, $args = array() ) {
$args = wp_parse_args(
$args,
array(
'qty' => '',
'price' => '',
)
);
$_product = get_post_meta($event, 'link_wc_product', true) ? get_post_meta($event, 'link_wc_product', true) : $event;
$qty = '' !== $args['qty'] ? max( 0.0, (float) $args['qty'] ) : 1;
$product = wc_get_product( $_product );
if ( '' === $price ) {
return '';
} elseif ( empty( $qty ) ) {
return 0.0;
}
$line_price = $price * $qty;
if ( $product->is_taxable() && wc_prices_include_tax() ) {
$tax_rates = WC_Tax::get_rates( $product->get_tax_class() );
$base_tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class( 'unfiltered' ) );
$remove_taxes = apply_filters( 'woocommerce_adjust_non_base_location_prices', true ) ? WC_Tax::calc_tax( $line_price, $base_tax_rates, true ) : WC_Tax::calc_tax( $line_price, $tax_rates, true );
$return_price = $line_price - array_sum( $remove_taxes ); // Unrounded since we're dealing with tax inclusive prices. Matches logic in cart-totals class. @see adjust_non_base_location_price.
} else {
$return_price = $line_price;
}
return apply_filters( 'woocommerce_get_price_excluding_tax', $return_price, $qty, $product );
}
function mep_get_price_including_tax( $event, $price, $args = array() ) {
@ -3591,7 +3709,7 @@ if (strtotime(current_time('Y-m-d H:i')) < strtotime($std) && $cn == 0) {
add_filter('mep_event_confirmation_text','mep_virtual_join_info_event_email_text',10,3);
function mep_virtual_join_info_event_email_text($content,$event_id,$order_id){
$event_type = get_post_meta($event_id, 'mep_event_type', true) ? get_post_meta($event_id, 'mep_event_type', true) : 'offline';
$email_content = get_post_meta($event_id, 'mp_event_virtual_type_des', true) ? get_post_meta($event_id, 'mp_event_virtual_type_des', true) : '';
$email_content = get_post_meta($event_id, 'mp_event_virtual_type_des', true) ? htmlspecialchars_decode(get_post_meta($event_id, 'mp_event_virtual_type_des', true)) : '';
if($event_type == 'online'){
$content = $content.'<br/>'.$email_content;

View File

@ -8,6 +8,7 @@ if (!function_exists('mep_event_google_map')) {
function mep_event_google_map($event_id)
{
global $post, $event_meta, $user_api;
$map_type = mep_get_option('mep_google_map_type', 'general_setting_sec', 'iframe');
$location_sts = get_post_meta($event_id, 'mep_org_address', true) ? get_post_meta($event_id, 'mep_org_address', true) : '';