function update

This commit is contained in:
magepeopleteam 2021-12-22 10:57:18 +00:00
parent f6409a90a5
commit a4afc6bc8c
11 changed files with 63 additions and 39 deletions

View File

@ -113,6 +113,8 @@ function mep_add_custom_price($cart_object)
}
/**
* After update the price now need to show user what they selected and the Price details, the below fuunction is for that, Its showing the details into the cart below the event name.
*/
@ -358,6 +360,10 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
}
}
if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) {
foreach ($event_extra_service as $extra_service) {
$service_type_name = $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid, $extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ';

View File

@ -22,7 +22,7 @@ if (!class_exists('EDD_SL_Plugin_Updater')) {
require_once(dirname(__DIR__) . "/inc/mep_enque.php");
require_once(dirname(__DIR__) . "/inc/mep_user_custom_style.php");
require_once(dirname(__DIR__) . "/inc/mep_tax_meta.php");
require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
// require_once(dirname(__DIR__) . "/inc/mep_upgrade.php");
require_once(dirname(__DIR__) . "/inc/mep_functions.php");
require_once(dirname(__DIR__) . "/inc/mep_query.php");
require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");

View File

@ -413,11 +413,17 @@ if (!function_exists('mep_attendee_create')) {
$payment_method = isset($order_meta['_payment_method_title'][0]) ? sanitize_text_field($order_meta['_payment_method_title'][0]) : '';
$user_id = isset($order_meta['_customer_user'][0]) ? sanitize_text_field($order_meta['_customer_user'][0]) : '';
if ($type == 'billing') {
// Billing Information
$first_name = isset($order_meta['_billing_first_name'][0]) ? sanitize_text_field($order_meta['_billing_first_name'][0]) : '';
$last_name = isset($order_meta['_billing_last_name'][0]) ? sanitize_text_field($order_meta['_billing_last_name'][0]) : '';
$uname = $first_name . ' ' . $last_name;
$billing_full_name = $first_name . ' ' . $last_name;
if ($type == 'billing') {
// Billing Information
$company = isset($order_meta['_billing_company'][0]) ? sanitize_text_field($order_meta['_billing_company'][0]) : '';
$address_1 = isset($order_meta['_billing_address_1'][0]) ? sanitize_text_field($order_meta['_billing_address_1'][0]) : '';
$address_2 = isset($order_meta['_billing_address_2'][0]) ? sanitize_text_field($order_meta['_billing_address_2'][0]) : '';
@ -439,7 +445,7 @@ if (!function_exists('mep_attendee_create')) {
} elseif ($type == 'user_form') {
$uname = sanitize_text_field($_user_info['user_name']);
$_uname = sanitize_text_field($_user_info['user_name']);
$email = sanitize_text_field($_user_info['user_email']);
$phone = sanitize_text_field($_user_info['user_phone']);
$address = sanitize_text_field($_user_info['user_address']);
@ -458,6 +464,7 @@ if (!function_exists('mep_attendee_create')) {
}
$ticket_total_price = (int) (mep_get_event_ticket_price_by_name($event_id, $ticket_type) * (int) $ticket_qty);
$uname = isset($_uname) && !empty($_uname) ? $_uname : $billing_full_name;
$new_post = array(
'post_title' => $uname,
@ -2737,7 +2744,6 @@ if (!function_exists('mep_product_tags_sorting_query')) {
'terms' => 'uncategorized ',
'operator' => 'NOT IN',
]
);
$query->set('tax_query', $tax_query);
}
@ -4142,18 +4148,28 @@ function mep_default_sidebar_reg() {
}
add_action('widgets_init', 'mep_default_sidebar_reg');
function mep_html_chr($string){
$find = ['&','#038;'];
$replace = ['and',''];
return html_entity_decode(str_replace($find,$replace,$string));
// return str_replace("&","pink",'Test & Time Event');
}
//********************Share button*************//
add_action('mep_after_social_share_list', 'mep_custom_share_btn', 10, 1);
if (!function_exists('mep_custom_share_btn')) {
function mep_custom_share_btn($event_id) {
?>
<li>
<a href="https://api.whatsapp.com/send?text=<?php echo get_the_title($event_id) . ' '; ?><?php echo get_the_permalink($event_id); ?>" target="_blank">
<a href="https://api.whatsapp.com/send?text=<?php echo mep_html_chr(get_the_title($event_id)) . ' '; ?><?php echo get_the_permalink($event_id); ?>" target="_blank">
<i class="fab fa-whatsapp"></i>
</a>
</li>
<li>
<a href="mailto:?subject=I wanted you to see this site&amp;body=<?php echo get_the_title($event_id) . ' '; ?><?php echo get_the_permalink($event_id); ?>" title="Share by Email">
<a href="mailto:?subject=I wanted you to see this site&amp;body=<?php echo mep_html_chr(get_the_title($event_id)) . ' '; ?><?php echo get_the_permalink($event_id); ?>" title="Share by Email">
<i class="fa fa-envelope"></i>
</a>
</li>
@ -4684,3 +4700,6 @@ if (!class_exists('MPWEM_Helper')) {
}
new MPWEM_Helper();
}

View File

@ -211,8 +211,8 @@ class MEPEventDateWidget extends Widget_Base {
if(!empty($event_datetime)){
?>
<div class="mep-default-datetime mep-elementor-widget-datetime">
<span><?php echo esc_html($mep_location_icon.' '.$before_text); ?></span>
<span><?php echo esc_html(get_mep_datetime($event_datetime,$datetdisplaystyle)); ?></span> <span><?php echo esc_html($after_text); ?></span>
<span><?php echo mep_esc_html($mep_location_icon.' '.$before_text); ?></span>
<span><?php echo esc_html(get_mep_datetime($event_datetime,$datetdisplaystyle)); ?></span> <span><?php echo mep_esc_html($after_text); ?></span>
</div>
<?php
}

View File

@ -193,9 +193,9 @@ class MEPEventLocationWidget extends Widget_Base {
if(!empty($mep_event_location_style)){
?>
<div class="mep-default-location mep-elementor-widget-location">
<span><?php echo esc_html($mep_location_icon.' '.$before_text); ?></span>
<span><?php echo mep_esc_html($mep_location_icon.' '.$before_text); ?></span>
<span><?php mep_get_location($event_id,$mep_event_location_style); ?></span>
<span><?php echo esc_html($after_text); ?></span>
<span><?php echo mep_esc_html($after_text); ?></span>
</div>
<?php
}

View File

@ -114,7 +114,7 @@ class MEPEventOrgWidget extends Widget_Base {
if(sizeof($author_terms) > 0){
?>
<div class="mep-default-org mep-elementor-widget-org">
<span><?php echo esc_html($before_text); ?></span> <span><?php echo esc_html($author_terms[0]->name); ?></span> <span><?php echo esc_html($after_text); ?></span>
<span><?php echo mep_esc_html($before_text); ?></span> <span><?php echo esc_html($author_terms[0]->name); ?></span> <span><?php echo mep_esc_html($after_text); ?></span>
</div>
<?php
}

View File

@ -110,7 +110,7 @@ class MEPEventSeattWidget extends Widget_Base {
if (get_post_type($event_id) == 'mep_events') {
?>
<div class="mep-default-seat mep-elementor-widget-seat">
<span><?php echo esc_html($before_text); ?></span> <span><?php do_action('mep_event_seat',$event_id); ?></span><span><?php echo esc_html($after_text); ?></span>
<span><?php echo mep_esc_html($before_text); ?></span> <span><?php do_action('mep_event_seat',$event_id); ?></span><span><?php echo mep_esc_html($after_text); ?></span>
</div>
<?php
}

View File

@ -4,7 +4,6 @@ $month = mep_get_event_upcomming_date($event_id, 'month-name');
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
$mep_hide_event_hover_btn = mep_get_option('mep_hide_event_hover_btn', 'general_setting_sec', 'no');
$mep_hide_event_hover_btn_text = mep_get_option('mep_hide_event_hover_btn_text', 'general_setting_sec', 'Book Now');
$taxonomy_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
$date = get_post_meta($event_id, 'event_upcoming_datetime', true);

View File

@ -1,5 +1,5 @@
<li>
<a href="<?php echo get_the_permalink($event_id) . esc_attr('?date=' . strtotime($start_datetime)); ?>">
<?php do_action('mep_single_before_event_date_list_item',$event_id,$start_datetime); ?>
<span class="mep-more-date">
<i class="fa fa-calendar"></i>
<span class='mep_date_scdl_start_datetime'>
@ -18,5 +18,5 @@
</span>
<?php } ?>
</span>
</a>
<?php do_action('mep_single_after_event_date_list_item',$event_id,$start_datetime); ?>
</li>

View File

@ -3,7 +3,7 @@
<ul class='mep-social-share'>
<?php do_action('mep_before_social_share_list',get_the_id()); ?>
<li> <a data-toggle="tooltip" title="" class="facebook" onclick="window.open('https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>','Facebook','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" data-original-title="Share on Facebook"><i class="fab fa-facebook-f"></i></a></li>
<li><a data-toggle="tooltip" title="" class="twitter" onclick="window.open('https://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title(); ?>','Twitter share','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php the_title(); ?>" data-original-title="Twittet it"><i class="fab fa-twitter"></i></a></li>
<li><a data-toggle="tooltip" title="" class="twitter" onclick="window.open('https://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php echo mep_html_chr(get_the_title()); ?>','Twitter share','width=600,height=300,left='+(screen.availWidth/2-300)+',top='+(screen.availHeight/2-150)+''); return false;" href="http://twitter.com/share?url=<?php the_permalink(); ?>&amp;text=<?php echo mep_html_chr(get_the_title()); ?>" data-original-title="Twittet it"><i class="fab fa-twitter"></i></a></li>
<?php do_action('mep_after_social_share_list',get_the_id()); ?>
</ul>
</div>