function update
This commit is contained in:
parent
f6409a90a5
commit
a4afc6bc8c
|
@ -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.
|
* 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) {
|
if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) {
|
||||||
foreach ($event_extra_service as $extra_service) {
|
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'] . ' = ';
|
$service_type_name = $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid, $extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ';
|
||||||
|
|
|
@ -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_enque.php");
|
||||||
require_once(dirname(__DIR__) . "/inc/mep_user_custom_style.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_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_functions.php");
|
||||||
require_once(dirname(__DIR__) . "/inc/mep_query.php");
|
require_once(dirname(__DIR__) . "/inc/mep_query.php");
|
||||||
require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");
|
require_once(dirname(__DIR__) . "/support/elementor/elementor-support.php");
|
|
@ -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]) : '';
|
$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]) : '';
|
$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]) : '';
|
$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]) : '';
|
$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]) : '';
|
$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_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]) : '';
|
$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') {
|
} 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']);
|
$email = sanitize_text_field($_user_info['user_email']);
|
||||||
$phone = sanitize_text_field($_user_info['user_phone']);
|
$phone = sanitize_text_field($_user_info['user_phone']);
|
||||||
$address = sanitize_text_field($_user_info['user_address']);
|
$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);
|
$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(
|
$new_post = array(
|
||||||
'post_title' => $uname,
|
'post_title' => $uname,
|
||||||
|
@ -2522,7 +2529,7 @@ function mep_get_location($event_id, $type) {
|
||||||
|
|
||||||
if ($type == 'full') {
|
if ($type == 'full') {
|
||||||
|
|
||||||
echo esc_html(implode(',', array_filter($location_arr)));
|
echo esc_html(implode(', ', array_filter($location_arr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 'location') {
|
if ($type == 'location') {
|
||||||
|
@ -2737,7 +2744,6 @@ if (!function_exists('mep_product_tags_sorting_query')) {
|
||||||
'terms' => 'uncategorized ',
|
'terms' => 'uncategorized ',
|
||||||
'operator' => 'NOT IN',
|
'operator' => 'NOT IN',
|
||||||
]
|
]
|
||||||
|
|
||||||
);
|
);
|
||||||
$query->set('tax_query', $tax_query);
|
$query->set('tax_query', $tax_query);
|
||||||
}
|
}
|
||||||
|
@ -4142,18 +4148,28 @@ function mep_default_sidebar_reg() {
|
||||||
}
|
}
|
||||||
add_action('widgets_init', '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*************//
|
//********************Share button*************//
|
||||||
add_action('mep_after_social_share_list', 'mep_custom_share_btn', 10, 1);
|
add_action('mep_after_social_share_list', 'mep_custom_share_btn', 10, 1);
|
||||||
if (!function_exists('mep_custom_share_btn')) {
|
if (!function_exists('mep_custom_share_btn')) {
|
||||||
function mep_custom_share_btn($event_id) {
|
function mep_custom_share_btn($event_id) {
|
||||||
?>
|
?>
|
||||||
<li>
|
<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>
|
<i class="fab fa-whatsapp"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="mailto:?subject=I wanted you to see this site&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&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>
|
<i class="fa fa-envelope"></i>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -4684,3 +4700,6 @@ if (!class_exists('MPWEM_Helper')) {
|
||||||
}
|
}
|
||||||
new MPWEM_Helper();
|
new MPWEM_Helper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -211,8 +211,8 @@ class MEPEventDateWidget extends Widget_Base {
|
||||||
if(!empty($event_datetime)){
|
if(!empty($event_datetime)){
|
||||||
?>
|
?>
|
||||||
<div class="mep-default-datetime mep-elementor-widget-datetime">
|
<div class="mep-default-datetime mep-elementor-widget-datetime">
|
||||||
<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 echo esc_html(get_mep_datetime($event_datetime,$datetdisplaystyle)); ?></span> <span><?php echo esc_html($after_text); ?></span>
|
<span><?php echo esc_html(get_mep_datetime($event_datetime,$datetdisplaystyle)); ?></span> <span><?php echo mep_esc_html($after_text); ?></span>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,9 +193,9 @@ class MEPEventLocationWidget extends Widget_Base {
|
||||||
if(!empty($mep_event_location_style)){
|
if(!empty($mep_event_location_style)){
|
||||||
?>
|
?>
|
||||||
<div class="mep-default-location mep-elementor-widget-location">
|
<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 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>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ class MEPEventOrgWidget extends Widget_Base {
|
||||||
if(sizeof($author_terms) > 0){
|
if(sizeof($author_terms) > 0){
|
||||||
?>
|
?>
|
||||||
<div class="mep-default-org mep-elementor-widget-org">
|
<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>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,7 +110,7 @@ class MEPEventSeattWidget extends Widget_Base {
|
||||||
if (get_post_type($event_id) == 'mep_events') {
|
if (get_post_type($event_id) == 'mep_events') {
|
||||||
?>
|
?>
|
||||||
<div class="mep-default-seat mep-elementor-widget-seat">
|
<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>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -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';
|
$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 = 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');
|
$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_category = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_cat');
|
||||||
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
|
$taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
|
||||||
$date = get_post_meta($event_id, 'event_upcoming_datetime', true);
|
$date = get_post_meta($event_id, 'event_upcoming_datetime', true);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li>
|
<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">
|
<span class="mep-more-date">
|
||||||
<i class="fa fa-calendar"></i>
|
<i class="fa fa-calendar"></i>
|
||||||
<span class='mep_date_scdl_start_datetime'>
|
<span class='mep_date_scdl_start_datetime'>
|
||||||
|
@ -18,5 +18,5 @@
|
||||||
</span>
|
</span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
<?php do_action('mep_single_after_event_date_list_item',$event_id,$start_datetime); ?>
|
||||||
</li>
|
</li>
|
|
@ -3,7 +3,7 @@
|
||||||
<ul class='mep-social-share'>
|
<ul class='mep-social-share'>
|
||||||
<?php do_action('mep_before_social_share_list',get_the_id()); ?>
|
<?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="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(); ?>&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(); ?>&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(); ?>&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(); ?>&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()); ?>
|
<?php do_action('mep_after_social_share_list',get_the_id()); ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue