version 3.7.0 released
This commit is contained in:
parent
f927600b6d
commit
7a0d990279
|
@ -598,7 +598,7 @@ iframe#gmap_canvas {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
width: max-content;
|
width: auto;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,14 +748,13 @@ iframe#gmap_canvas {
|
||||||
}
|
}
|
||||||
|
|
||||||
p.event_meta_help_txt {
|
p.event_meta_help_txt {
|
||||||
font-size: 13px;
|
font-size: 11px;
|
||||||
margin: 5px;
|
margin: 3px 0;
|
||||||
color: #004085;
|
color: #004085;
|
||||||
background-color: #cce5ff;
|
background-color: #cce5ff;
|
||||||
padding: .75rem 1.25rem;
|
padding: 5px;
|
||||||
margin-bottom: 1rem;
|
|
||||||
border: 1px solid #b8daff;
|
border: 1px solid #b8daff;
|
||||||
border-radius: .25rem;
|
border-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
p.event_meta_help_txt:before {
|
p.event_meta_help_txt:before {
|
||||||
|
@ -1422,3 +1421,40 @@ input#mep_search_icon {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.mep-event-shortcode-info {
|
||||||
|
background: #f9f9f9;
|
||||||
|
padding: 20px;
|
||||||
|
text-align: center;
|
||||||
|
border: 2px solid #ccc;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep-event-shortcode-info code {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
position: relative;
|
||||||
|
margin: -10px 0px -11px;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.mep-event-shortcode-info ul li {
|
||||||
|
display: inline-block!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
li {}
|
||||||
|
|
||||||
|
.mep-event-shortcode-info ul {
|
||||||
|
margin-top: 15px!important;
|
||||||
|
display: block!important;
|
||||||
|
}
|
||||||
|
select#mep_org_address_list {
|
||||||
|
min-width: 177px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mep_event_tab_location_content {
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3.mep_virtual_sec_title {
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
|
@ -60,20 +60,25 @@ class MP_Event_All_Info_In_One
|
||||||
<div class="mp_tab_details">
|
<div class="mp_tab_details">
|
||||||
<?php do_action('mep_admin_event_details_before_tab_details_location', $post_id); ?>
|
<?php do_action('mep_admin_event_details_before_tab_details_location', $post_id); ?>
|
||||||
<div class="mp_tab_item active" data-tab-item="#mp_event_venue">
|
<div class="mp_tab_item active" data-tab-item="#mp_event_venue">
|
||||||
<h3><?php echo esc_html($event_label);
|
<?php do_action('mep_event_tab_before_location',$post_id); ?>
|
||||||
esc_html_e(' Location :', 'mage-eventpress'); ?></h3>
|
<div class='mep_event_tab_location_content'>
|
||||||
|
<h3><?php echo esc_html($event_label); esc_html_e(' Location :', 'mage-eventpress'); ?></h3>
|
||||||
<hr />
|
<hr />
|
||||||
<?php $this->mp_event_venue($post_id); ?>
|
<?php $this->mp_event_venue($post_id); ?>
|
||||||
|
</div>
|
||||||
<?php do_action('mep_event_tab_after_location'); ?>
|
<?php do_action('mep_event_tab_after_location'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php do_action('mep_admin_event_details_after_tab_details_location', $post_id); ?>
|
<?php do_action('mep_admin_event_details_after_tab_details_location', $post_id); ?>
|
||||||
<div class="mp_tab_item" data-tab-item="#mp_ticket_type_pricing">
|
<div class="mp_tab_item" data-tab-item="#mp_ticket_type_pricing">
|
||||||
|
<?php do_action('mep_event_tab_before_ticket_pricing',$post_id); ?>
|
||||||
|
<div class='mep_ticket_type_setting_sec'>
|
||||||
<h3><?php esc_html_e('Ticket Type List :', 'mage-eventpress'); ?></h3>
|
<h3><?php esc_html_e('Ticket Type List :', 'mage-eventpress'); ?></h3>
|
||||||
<hr />
|
<hr />
|
||||||
<?php $this->mep_event_ticket_type($post_id); ?>
|
<?php $this->mep_event_ticket_type($post_id); ?>
|
||||||
<h3><?php esc_html_e('Extra service Area :', 'mage-eventpress'); ?></h3>
|
<h3><?php esc_html_e('Extra service Area :', 'mage-eventpress'); ?></h3>
|
||||||
<hr />
|
<hr />
|
||||||
<?php $this->mep_event_extra_price_option($post_id); ?>
|
<?php $this->mep_event_extra_price_option($post_id); ?>
|
||||||
|
</div>
|
||||||
<?php do_action('mep_event_tab_after_ticket_pricing'); ?>
|
<?php do_action('mep_event_tab_after_ticket_pricing'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php do_action('mep_admin_event_details_after_tab_details_ticket_type', $post_id); ?>
|
<?php do_action('mep_admin_event_details_after_tab_details_ticket_type', $post_id); ?>
|
||||||
|
@ -174,8 +179,8 @@ class MP_Event_All_Info_In_One
|
||||||
<tr>
|
<tr>
|
||||||
<th style="min-width: 160px;"><?php esc_html_e(" Location Source:", "mage-eventpress"); ?></th>
|
<th style="min-width: 160px;"><?php esc_html_e(" Location Source:", "mage-eventpress"); ?></th>
|
||||||
<td colspan="3" style="min-width: 450px;">
|
<td colspan="3" style="min-width: 450px;">
|
||||||
<label>
|
<label for='mep_org_address_list'>
|
||||||
<select class="mp_formControl" name="mep_org_address">
|
<select class="mp_formControl" name="mep_org_address" class='mep_org_address_list' id='mep_org_address_list'>
|
||||||
<option value="0" <?php echo ($mep_org_address == 0) ? esc_attr('selected') : ''; ?>><?php echo esc_html($event_label);
|
<option value="0" <?php echo ($mep_org_address == 0) ? esc_attr('selected') : ''; ?>><?php echo esc_html($event_label);
|
||||||
_e(' Details', 'mage-eventpress'); ?></option>
|
_e(' Details', 'mage-eventpress'); ?></option>
|
||||||
<option value="1" <?php echo ($mep_org_address == 1) ? esc_attr('selected') : ''; ?>><?php esc_html_e('Organizer', 'mage-eventpress'); ?></option>
|
<option value="1" <?php echo ($mep_org_address == 1) ? esc_attr('selected') : ''; ?>><?php esc_html_e('Organizer', 'mage-eventpress'); ?></option>
|
||||||
|
@ -924,7 +929,7 @@ class MP_Event_All_Info_In_One
|
||||||
$reg_checked = 'checked';
|
$reg_checked = 'checked';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<!-- <tr>
|
||||||
<th title="<?php esc_html_e('Event SKU No:', 'mage-eventpress'); ?>"><span><?php esc_html_e('SKU No:', 'mage-eventpress'); ?></span></th>
|
<th title="<?php esc_html_e('Event SKU No:', 'mage-eventpress'); ?>"><span><?php esc_html_e('SKU No:', 'mage-eventpress'); ?></span></th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<label>
|
<label>
|
||||||
|
@ -941,7 +946,7 @@ class MP_Event_All_Info_In_One
|
||||||
<span class="slider round"></span>
|
<span class="slider round"></span>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr> -->
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,7 +1010,7 @@ class MP_Event_All_Info_In_One
|
||||||
$checked = ($event_type == 'online') ? 'checked' : '';
|
$checked = ($event_type == 'online') ? 'checked' : '';
|
||||||
$member_checked = ($event_member_type == 'member_only') ? 'checked' : '';
|
$member_checked = ($event_member_type == 'member_only') ? 'checked' : '';
|
||||||
?>
|
?>
|
||||||
<tr>
|
<!-- <tr>
|
||||||
<th><span><?php esc_html_e('Virtual ', 'mage-eventpress');
|
<th><span><?php esc_html_e('Virtual ', 'mage-eventpress');
|
||||||
echo esc_html($event_label . '?'); ?></span></th>
|
echo esc_html($event_label . '?'); ?></span></th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
|
@ -1019,7 +1024,7 @@ class MP_Event_All_Info_In_One
|
||||||
<p class="event_meta_help_txt"><?php esc_html_e('Please Enter Your Virtual event joining details Information. these information will send to buyer with confirmation email.', 'mage-eventpress') ?></p>
|
<p class="event_meta_help_txt"><?php esc_html_e('Please Enter Your Virtual event joining details Information. these information will send to buyer with confirmation email.', 'mage-eventpress') ?></p>
|
||||||
</label>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr> -->
|
||||||
<tr>
|
<tr>
|
||||||
<th><span><?php esc_html_e('Member Only Event?', 'mage-eventpress'); ?></span></th>
|
<th><span><?php esc_html_e('Member Only Event?', 'mage-eventpress'); ?></span></th>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
|
|
|
@ -131,7 +131,7 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
|
||||||
$ticket_type_arr = $cart_item['event_ticket_info'];
|
$ticket_type_arr = $cart_item['event_ticket_info'];
|
||||||
$event_extra_service = $cart_item['event_extra_service'];
|
$event_extra_service = $cart_item['event_extra_service'];
|
||||||
$event_recurring_date = $cart_item['event_recurring_date'];
|
$event_recurring_date = $cart_item['event_recurring_date'];
|
||||||
|
// echo '<pre>'; print_r($ticket_type_arr); echo '</pre>';
|
||||||
$recurring = get_post_meta($eid, 'mep_enable_recurring', true) ? get_post_meta($eid, 'mep_enable_recurring', true) : 'no';
|
$recurring = get_post_meta($eid, 'mep_enable_recurring', true) ? get_post_meta($eid, 'mep_enable_recurring', true) : 'no';
|
||||||
$time_status = get_post_meta($eid, 'mep_disable_ticket_time', true) ? get_post_meta($eid, 'mep_disable_ticket_time', true) : 'no';
|
$time_status = get_post_meta($eid, 'mep_disable_ticket_time', true) ? get_post_meta($eid, 'mep_disable_ticket_time', true) : 'no';
|
||||||
$start_time = get_post_meta($eid, 'event_start_time', true);
|
$start_time = get_post_meta($eid, 'event_start_time', true);
|
||||||
|
@ -143,7 +143,7 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
|
||||||
|
|
||||||
foreach ($ticket_type_arr as $_event_recurring_date) {
|
foreach ($ticket_type_arr as $_event_recurring_date) {
|
||||||
if ($hide_date_status == 'no') {
|
if ($hide_date_status == 'no') {
|
||||||
?>
|
?>
|
||||||
<li><?php esc_html_e(" Date", 'mage-eventpress'); ?>: <?php echo esc_html(get_mep_datetime($_event_recurring_date['event_date'], apply_filters('mep_cart_date_format','date-time-text'))); ?></li>
|
<li><?php esc_html_e(" Date", 'mage-eventpress'); ?>: <?php echo esc_html(get_mep_datetime($_event_recurring_date['event_date'], apply_filters('mep_cart_date_format','date-time-text'))); ?></li>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,7 +505,8 @@ if (!function_exists('mep_attendee_create')) {
|
||||||
update_post_meta($order_id, 'order_type_name', 'mep_events');
|
update_post_meta($order_id, 'order_type_name', 'mep_events');
|
||||||
update_post_meta($pid, 'ea_ticket_no', $pin);
|
update_post_meta($pid, 'ea_ticket_no', $pin);
|
||||||
update_post_meta($pid, 'ea_event_date', $event_date);
|
update_post_meta($pid, 'ea_event_date', $event_date);
|
||||||
update_post_meta($pid, 'ea_order_status', $order_status);
|
// update_post_meta($pid, 'ea_order_status', $order_status);
|
||||||
|
update_post_meta($pid, 'ea_flag', 'checkout_processed');
|
||||||
update_post_meta($order_id, 'ea_order_status', $order_status);
|
update_post_meta($order_id, 'ea_order_status', $order_status);
|
||||||
|
|
||||||
$hooking_data = apply_filters('mep_event_attendee_dynamic_data', array(), $pid, $type, $order_id, $event_id, $_user_info);
|
$hooking_data = apply_filters('mep_event_attendee_dynamic_data', array(), $pid, $type, $order_id, $event_id, $_user_info);
|
||||||
|
@ -522,6 +523,7 @@ if (!function_exists('mep_attendee_create')) {
|
||||||
if (sizeof($mep_form_builder_data) > 0) {
|
if (sizeof($mep_form_builder_data) > 0) {
|
||||||
foreach ($mep_form_builder_data as $_field) {
|
foreach ($mep_form_builder_data as $_field) {
|
||||||
update_post_meta($pid, "ea_" . $_field['mep_fbc_id'], $_user_info[$_field['mep_fbc_id']]);
|
update_post_meta($pid, "ea_" . $_field['mep_fbc_id'], $_user_info[$_field['mep_fbc_id']]);
|
||||||
|
mep_attendee_upload_file_save_move($event_id,$_user_info,$_field,$order_id);
|
||||||
}
|
}
|
||||||
} // End User Form builder data update loop
|
} // End User Form builder data update loop
|
||||||
|
|
||||||
|
@ -566,8 +568,12 @@ if (!function_exists('mep_attendee_extra_service_create')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!function_exists('mep_check_attendee_exist_before_create')) {
|
if (!function_exists('mep_check_attendee_exist_before_create')) {
|
||||||
function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
function mep_check_attendee_exist_before_create($order_id, $event_id, $date ='') {
|
||||||
|
$date_filter = !empty($date) ? array(
|
||||||
|
'key' => 'ea_event_date',
|
||||||
|
'value' => $date,
|
||||||
|
'compare' => 'LIKE'
|
||||||
|
) : '';
|
||||||
$pending_status_filter = array(
|
$pending_status_filter = array(
|
||||||
'key' => 'ea_order_status',
|
'key' => 'ea_order_status',
|
||||||
'value' => 'pending',
|
'value' => 'pending',
|
||||||
|
@ -607,7 +613,8 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
'key' => 'ea_order_id',
|
'key' => 'ea_order_id',
|
||||||
'value' => $order_id,
|
'value' => $order_id,
|
||||||
'compare' => '='
|
'compare' => '='
|
||||||
)
|
),
|
||||||
|
$date_filter
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'relation' => 'OR',
|
'relation' => 'OR',
|
||||||
|
@ -628,6 +635,7 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
// add_action('woocommerce_blocks_checkout_order_processed', 'mep_event_booking_management', 90);
|
// add_action('woocommerce_blocks_checkout_order_processed', 'mep_event_booking_management', 90);
|
||||||
if (!function_exists('mep_event_booking_management')) {
|
if (!function_exists('mep_event_booking_management')) {
|
||||||
function mep_event_booking_management( $order_id) {
|
function mep_event_booking_management( $order_id) {
|
||||||
|
global $woocommerce;
|
||||||
|
|
||||||
$result = !is_numeric($order_id) ? json_decode($order_id) : [0];
|
$result = !is_numeric($order_id) ? json_decode($order_id) : [0];
|
||||||
$order_id = !is_numeric($order_id) ? $result->id : $order_id;
|
$order_id = !is_numeric($order_id) ? $result->id : $order_id;
|
||||||
|
@ -658,7 +666,7 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
$event_ticket_info_arr = wc_get_order_item_meta($item_id,'_event_ticket_info',true);
|
$event_ticket_info_arr = wc_get_order_item_meta($item_id,'_event_ticket_info',true);
|
||||||
$item_quantity = 0;
|
$item_quantity = 0;
|
||||||
$check_before_create = mep_check_attendee_exist_before_create($order_id,$event_id);
|
$check_before_create = mep_check_attendee_exist_before_create($order_id,$event_id);
|
||||||
|
mep_delete_attandee_of_an_order($order_id, $event_id);
|
||||||
foreach ( $event_ticket_info_arr as $field ) {
|
foreach ( $event_ticket_info_arr as $field ) {
|
||||||
if($field['ticket_qty']>0){
|
if($field['ticket_qty']>0){
|
||||||
$item_quantity = $item_quantity + $field['ticket_qty'];
|
$item_quantity = $item_quantity + $field['ticket_qty'];
|
||||||
|
@ -666,18 +674,17 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
}
|
}
|
||||||
if(is_array($user_info_arr) & sizeof($user_info_arr) > 0){
|
if(is_array($user_info_arr) & sizeof($user_info_arr) > 0){
|
||||||
foreach ($user_info_arr as $_user_info) {
|
foreach ($user_info_arr as $_user_info) {
|
||||||
if($check_before_create < count($user_info_arr)){
|
// if($check_before_create < count($user_info_arr)){
|
||||||
mep_attendee_create('user_form',$order_id,$event_id,$_user_info);
|
mep_attendee_create('user_form',$order_id,$event_id,$_user_info);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
foreach($event_ticket_info_arr as $tinfo){
|
foreach($event_ticket_info_arr as $tinfo){
|
||||||
for ($x = 1; $x <= $tinfo['ticket_qty']; $x++) {
|
for ($x = 1; $x <= $tinfo['ticket_qty']; $x++) {
|
||||||
|
|
||||||
if($check_before_create < count($event_ticket_info_arr)){
|
// if($check_before_create < count($event_ticket_info_arr)){
|
||||||
mep_attendee_create('billing',$order_id,$event_id,$tinfo);
|
mep_attendee_create('billing',$order_id,$event_id,$tinfo);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -697,6 +704,7 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
$item_quantity = 0;
|
$item_quantity = 0;
|
||||||
$check_before_create = mep_check_attendee_exist_before_create($order_id,$event_id);
|
$check_before_create = mep_check_attendee_exist_before_create($order_id,$event_id);
|
||||||
mep_attendee_extra_service_create($order_id,$event_id,$_event_extra_service);
|
mep_attendee_extra_service_create($order_id,$event_id,$_event_extra_service);
|
||||||
|
mep_delete_attandee_of_an_order($order_id, $event_id);
|
||||||
foreach ( $event_ticket_info_arr as $field ) {
|
foreach ( $event_ticket_info_arr as $field ) {
|
||||||
if($field['ticket_qty']>0){
|
if($field['ticket_qty']>0){
|
||||||
$item_quantity = $item_quantity + $field['ticket_qty'];
|
$item_quantity = $item_quantity + $field['ticket_qty'];
|
||||||
|
@ -704,18 +712,23 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
}
|
}
|
||||||
if(is_array($user_info_arr) & sizeof($user_info_arr) > 0){
|
if(is_array($user_info_arr) & sizeof($user_info_arr) > 0){
|
||||||
foreach ($user_info_arr as $_user_info) {
|
foreach ($user_info_arr as $_user_info) {
|
||||||
|
$check_before_create_date = mep_check_attendee_exist_before_create($order_id,$event_id, $_user_info['user_event_date']);
|
||||||
if($check_before_create < count($user_info_arr)){
|
// if($check_before_create < count($user_info_arr)){
|
||||||
mep_attendee_create('user_form',$order_id,$event_id,$_user_info);
|
// if($check_before_create_date == 0){
|
||||||
}
|
mep_attendee_create('user_form',$order_id,$event_id,$_user_info);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
foreach($event_ticket_info_arr as $tinfo){
|
foreach($event_ticket_info_arr as $tinfo){
|
||||||
for ($x = 1; $x <= $tinfo['ticket_qty']; $x++) {
|
for ($x = 1; $x <= $tinfo['ticket_qty']; $x++) {
|
||||||
if($check_before_create < count($event_ticket_info_arr)){
|
$check_before_create_date = mep_check_attendee_exist_before_create($order_id,$event_id, $tinfo['event_date']);
|
||||||
mep_attendee_create('billing',$order_id,$event_id,$tinfo);
|
// if($check_before_create < count($event_ticket_info_arr)){
|
||||||
}
|
// if($check_before_create_date == 0){
|
||||||
|
mep_attendee_create('billing',$order_id,$event_id,$tinfo);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -724,6 +737,7 @@ function mep_check_attendee_exist_before_create($order_id, $event_id) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
do_action('mep_after_event_booking',$order_id,$order->get_status());
|
do_action('mep_after_event_booking',$order_id,$order->get_status());
|
||||||
|
$woocommerce->cart->empty_cart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -745,6 +759,11 @@ function mep_delete_attandee_of_an_order($order_id, $event_id) {
|
||||||
'value' => $event_id,
|
'value' => $event_id,
|
||||||
'compare' => '='
|
'compare' => '='
|
||||||
),
|
),
|
||||||
|
// array(
|
||||||
|
// 'key' => 'ea_flag',
|
||||||
|
// 'value' => 'checkout_processed',
|
||||||
|
// 'compare' => '='
|
||||||
|
// )
|
||||||
array(
|
array(
|
||||||
'key' => 'ea_order_status',
|
'key' => 'ea_order_status',
|
||||||
'value' => 'pending',
|
'value' => 'pending',
|
||||||
|
@ -781,6 +800,7 @@ if (!function_exists('change_attandee_order_status')) {
|
||||||
foreach ($loop->posts as $ticket) {
|
foreach ($loop->posts as $ticket) {
|
||||||
$post_id = $ticket->ID;
|
$post_id = $ticket->ID;
|
||||||
update_post_meta($post_id, 'ea_order_status', $qr_status);
|
update_post_meta($post_id, 'ea_order_status', $qr_status);
|
||||||
|
update_post_meta($post_id, 'ea_flag', $qr_status);
|
||||||
$current_post = get_post($post_id, 'ARRAY_A');
|
$current_post = get_post($post_id, 'ARRAY_A');
|
||||||
$current_post['post_status'] = $set_status;
|
$current_post['post_status'] = $set_status;
|
||||||
wp_update_post($current_post);
|
wp_update_post($current_post);
|
||||||
|
@ -1700,6 +1720,24 @@ if (!function_exists('mep_event_list_price')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!function_exists('mep_event_list_number_price')) {
|
||||||
|
function mep_event_list_number_price($pid, $type='price') {
|
||||||
|
global $post;
|
||||||
|
$cur = get_woocommerce_currency_symbol();
|
||||||
|
$mep_event_ticket_type = get_post_meta($pid, 'mep_event_ticket_type', true) ? get_post_meta($pid, 'mep_event_ticket_type', true) : [];
|
||||||
|
$n_price = get_post_meta($pid, '_price', true);
|
||||||
|
$price_arr = [];
|
||||||
|
|
||||||
|
if(sizeof($mep_event_ticket_type) > 0){
|
||||||
|
foreach ($mep_event_ticket_type as $ticket) {
|
||||||
|
$price_arr[] = array_key_exists('option_price_t',$ticket) ? $ticket['option_price_t'] : null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $type == 'price' && sizeof($price_arr) > 0 ? min($price_arr) : count($price_arr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!function_exists('mep_get_label')) {
|
if (!function_exists('mep_get_label')) {
|
||||||
function mep_get_label($pid, $label_id, $default_text) {
|
function mep_get_label($pid, $label_id, $default_text) {
|
||||||
|
@ -2126,6 +2164,8 @@ if (!function_exists('mep_save_attendee_info_into_cart')) {
|
||||||
if ($mep_form_builder_data) {
|
if ($mep_form_builder_data) {
|
||||||
foreach ($mep_form_builder_data as $_field) {
|
foreach ($mep_form_builder_data as $_field) {
|
||||||
$user[$iu][$_field['mep_fbc_id']] = stripslashes(mage_array_strip($_POST[$_field['mep_fbc_id']][$iu]));
|
$user[$iu][$_field['mep_fbc_id']] = stripslashes(mage_array_strip($_POST[$_field['mep_fbc_id']][$iu]));
|
||||||
|
//mep_attendee_upload_file_system($user,$iu,$_field);
|
||||||
|
$user=apply_filters('mep_attendee_upload_file',$user,$iu,$_field);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3021,7 +3061,12 @@ if (!function_exists('mep_event_get_the_content')) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mep_string_sanitize($s) {
|
||||||
|
|
||||||
|
$str = str_replace(array('\'', '"'), '', $s);
|
||||||
|
return $str;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3052,35 +3097,46 @@ if (!function_exists('mep_event_rich_text_data')) {
|
||||||
?>
|
?>
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{
|
{
|
||||||
"@context": "https://schema.org",
|
"@context" : "https://schema.org",
|
||||||
"@type": "Event",
|
"@type" : "Event",
|
||||||
"name": "<?php echo esc_attr($event_name); ?>",
|
"name" : "<?php echo esc_attr($event_name); ?>",
|
||||||
"startDate": "<?php echo esc_attr($event_start_date); ?>",
|
"startDate" : "<?php echo esc_attr($event_start_date); ?>",
|
||||||
"endDate": "<?php echo esc_attr($event_end_date); ?>",
|
"endDate" : "<?php echo esc_attr($event_end_date); ?>",
|
||||||
"organizer": "<?php echo esc_attr($org_name); ?>",
|
"offers": {
|
||||||
|
"@type" : "Offer",
|
||||||
"eventStatus": "https://schema.org/<?php echo esc_attr($event_rt_status); ?>",
|
"url" : "<?php echo get_the_permalink($event_id); ?>",
|
||||||
"eventAttendanceMode": "https://schema.org/<?php echo esc_attr($event_rt_atdnce_mode); ?>",
|
"price" : "<?php echo strip_tags(mep_event_list_number_price($event_id)); ?>",
|
||||||
"previousStartDate": "<?php echo esc_attr($event_rt_prv_date); ?>",
|
"priceCurrency" : "<?php echo get_woocommerce_currency(); ?>",
|
||||||
"location": {
|
"availability" : "https://schema.org/InStock",
|
||||||
"@type": "Place",
|
"validFrom" : "<?php echo esc_attr($event_end_date); ?>"
|
||||||
"name": "<?php echo mep_get_event_location($event_id); ?>",
|
},
|
||||||
"address": {
|
"organizer": {
|
||||||
"@type": "PostalAddress",
|
"@type" : "Organization",
|
||||||
"streetAddress": "<?php echo mep_get_event_location_street($event_id); ?>",
|
"name" : "<?php echo esc_attr($org_name); ?>",
|
||||||
|
"url" : "<?php echo get_the_permalink($event_id); ?>"
|
||||||
|
},
|
||||||
|
"eventStatus" : "https://schema.org/<?php echo esc_attr($event_rt_status); ?>",
|
||||||
|
"eventAttendanceMode" : "https://schema.org/<?php echo esc_attr($event_rt_atdnce_mode); ?>",
|
||||||
|
"previousStartDate" : "<?php echo esc_attr($event_rt_prv_date); ?>",
|
||||||
|
"location" : {
|
||||||
|
"@type" : "Place",
|
||||||
|
"name" : "<?php echo mep_get_event_location($event_id); ?>",
|
||||||
|
"address" : {
|
||||||
|
"@type" : "PostalAddress",
|
||||||
|
"streetAddress" : "<?php echo mep_get_event_location_street($event_id); ?>",
|
||||||
"addressLocality": "<?php echo mep_get_event_location_city($event_id); ?>",
|
"addressLocality": "<?php echo mep_get_event_location_city($event_id); ?>",
|
||||||
"postalCode": "<?php echo mep_get_event_location_postcode($event_id) ?>",
|
"postalCode" : "<?php echo mep_get_event_location_postcode($event_id) ?>",
|
||||||
"addressRegion": "<?php echo mep_get_event_location_state($event_id) ?>",
|
"addressRegion" : "<?php echo mep_get_event_location_state($event_id) ?>",
|
||||||
"addressCountry": "<?php echo mep_get_event_location_country($event_id) ?>"
|
"addressCountry": "<?php echo mep_get_event_location_country($event_id) ?>"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"image": [
|
"image": [
|
||||||
"<?php echo get_the_post_thumbnail_url($event_id, 'full'); ?>"
|
"<?php echo get_the_post_thumbnail_url($event_id, 'full'); ?>"
|
||||||
],
|
],
|
||||||
"description": "<?php echo strip_tags(get_the_excerpt($event_id)); ?>",
|
"description": "<?php echo strip_tags(mep_string_sanitize(get_the_excerpt($event_id))); ?>",
|
||||||
"performer": {
|
"performer": {
|
||||||
"@type": "PerformingGroup",
|
"@type" : "PerformingGroup",
|
||||||
"name": "<?php echo esc_attr($org_name); ?>"
|
"name" : "<?php echo esc_attr($org_name); ?>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -4108,7 +4164,7 @@ function mep_get_event_add_cart_sec($post_id) {
|
||||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<!--The event add to cart main form start here-->
|
<!--The event add to cart main form start here-->
|
||||||
<form action="" method='post' id="mage_event_submit">
|
<form action="" method='post' id="mage_event_submit" enctype="multipart/form-data">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
||||||
|
@ -4669,9 +4725,9 @@ function mep_change_global_option_section($option_name, $old_sec_name, $new_sec_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
add_action( 'pre_get_posts', 'mep_search_query_exlude_hidden_wc_fix' );
|
add_action( 'pre_get_posts', 'mep_search_query_exlude_hidden_wc_fix' );
|
||||||
function mep_search_query_exlude_hidden_wc_fix( $query ) {
|
function mep_search_query_exlude_hidden_wc_fix( $query ) {
|
||||||
if ($query->is_search && !is_admin() ) {
|
if ($query->is_search && !is_admin() ) {
|
||||||
$query -> set( 'tax_query', array(
|
$query -> set( 'tax_query', array(
|
||||||
array(
|
array(
|
||||||
'taxonomy' => 'product_visibility',
|
'taxonomy' => 'product_visibility',
|
||||||
|
@ -4680,10 +4736,9 @@ function mep_change_global_option_section($option_name, $old_sec_name, $new_sec_
|
||||||
'operator' => 'NOT IN',
|
'operator' => 'NOT IN',
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
}
|
||||||
}
|
return $query;
|
||||||
return $query;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function mep_check_plugin_installed($path){
|
function mep_check_plugin_installed($path){
|
||||||
|
@ -4697,7 +4752,96 @@ function mep_check_plugin_installed($path){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
add_action('mep_event_tab_before_location','mep_event_tab_before_location_virtual_event');
|
||||||
|
function mep_event_tab_before_location_virtual_event($post_id){
|
||||||
|
$event_label = mep_get_option('mep_event_label', 'general_setting_sec', 'Events');
|
||||||
|
$event_type = get_post_meta($post_id, 'mep_event_type', true);
|
||||||
|
$event_member_type = get_post_meta($post_id, 'mep_member_only_event', true);
|
||||||
|
$description = html_entity_decode(get_post_meta($post_id, 'mp_event_virtual_type_des', true));
|
||||||
|
$checked = ($event_type == 'online') ? 'checked' : '';
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<h3 class='mep_virtual_sec_title'><span><?php esc_html_e('Online/Virtual ', 'mage-eventpress'); echo esc_html($event_label . '?'); ?> (No/Yes)</span></h3>
|
||||||
|
|
||||||
|
<label class="mp_event_virtual_type_des_switch">
|
||||||
|
<input class="mp_opacity_zero" type="checkbox" name="mep_event_type" <?php echo esc_attr($checked); ?> />
|
||||||
|
<span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
<p class="event_meta_help_txt"><?php _e('If your event is online or virtual, enable this option.','mage-eventpress'); ?></p>
|
||||||
|
<label class="mp_event_virtual_type_des <?php echo ($event_type == 'online') ? esc_attr('active') : ''; ?>">
|
||||||
|
<?php wp_editor(html_entity_decode(nl2br($description)), 'mp_event_virtual_type_des'); ?>
|
||||||
|
<p class="event_meta_help_txt"><?php esc_html_e('Please Enter Your Virtual event joining details Information. these information will send to buyer with confirmation email.', 'mage-eventpress') ?></p>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
|
||||||
|
<?php if($checked == 'checked'){ ?>
|
||||||
|
jQuery(".mep_event_tab_location_content").hide(200);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
add_action('mep_event_tab_before_ticket_pricing','mep_event_shortcode_info');
|
||||||
|
function mep_event_shortcode_info($post_id){
|
||||||
|
if($post_id){
|
||||||
|
|
||||||
|
$values = get_post_custom($post_id);
|
||||||
|
wp_nonce_field('mep_event_reg_btn_nonce', 'mep_event_reg_btn_nonce');
|
||||||
|
$reg_checked = '';
|
||||||
|
if (array_key_exists('mep_reg_status', $values)) {
|
||||||
|
if ($values['mep_reg_status'][0] == 'on') {
|
||||||
|
$reg_checked = 'checked';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$reg_checked = 'checked';
|
||||||
|
}
|
||||||
|
// echo $reg_checked;
|
||||||
|
?>
|
||||||
|
<div class='mep-event-shortcode-info'>
|
||||||
|
<p><?php _e('<b>Add To Cart Form Shortcode</b>','mage-eventpress'); ?></p>
|
||||||
|
<code> [event-add-cart-section event="<?php echo $post_id; ?>"]</code>
|
||||||
|
<p><?php _e('If you want to display this Ticket type list with the add to cart button anywhere in your website, copy the shortcode and use any post/page.','mage-eventpress'); ?></p>
|
||||||
|
<ul>
|
||||||
|
<li><span><?php esc_html_e('Registration Off/On:', 'mage-eventpress'); ?></span></li>
|
||||||
|
<li>
|
||||||
|
<label class='mp_event_ticket_type_des_switch'>
|
||||||
|
<input class="mp_opacity_zero" type="checkbox" name="mep_reg_status" <?php echo esc_attr($reg_checked); ?> /><span class="slider round"></span>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
jQuery(document).ready(function() {
|
||||||
|
|
||||||
|
<?php if($reg_checked != 'checked'){ ?>
|
||||||
|
jQuery(".mep_ticket_type_setting_sec").hide(200);
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
// jQuery(".mp_event_ticket_type_des_switch").click(function() {
|
||||||
|
// if(jQuery(this).is(":checked")) {
|
||||||
|
// jQuery(".mep_ticket_type_setting_sec").show(300);
|
||||||
|
// } else {
|
||||||
|
// jQuery(".mep_ticket_type_setting_sec").hide(200);
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ if (!function_exists('mep_get_event_reg_btn')) {
|
||||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<!--The event add to cart main form start here-->
|
<!--The event add to cart main form start here-->
|
||||||
<form action="" method='post' id="mage_event_submit">
|
<form action="" method='post' id="mage_event_submit" enctype="multipart/form-data">
|
||||||
<input type="hidden" name='' id='mep_event_id' value='<?php echo $event_id; ?>'>
|
<input type="hidden" name='' id='mep_event_id' value='<?php echo $event_id; ?>'>
|
||||||
<div class="mpwemasp_ticket_area">
|
<div class="mpwemasp_ticket_area">
|
||||||
<?php
|
<?php
|
||||||
|
@ -299,7 +299,7 @@ if (!function_exists('mep_get_event_reg_btn_list')) {
|
||||||
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
<?php echo mep_get_option('mep_register_now_text', 'label_setting_sec') ? mep_get_option('mep_register_now_text', 'label_setting_sec') : esc_html__('Register Now:', 'mage-eventpress'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<!--The event add to cart main form start here-->
|
<!--The event add to cart main form start here-->
|
||||||
<form action="" method='post' id="mage_event_submit">
|
<form action="" method='post' id="mage_event_submit" enctype="multipart/form-data">
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
* Here is a magic hook which fire just before of the Add to Cart Button, And the Ticket type & Extra service list are hooked up into this, You can find them into inc/template-parts/event_ticket_type_extra_service.php
|
||||||
|
|
|
@ -19,13 +19,33 @@
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
$(document).on('click', 'label.mp_event_virtual_type_des_switch input', function () {
|
$(document).on('click', 'label.mp_event_virtual_type_des_switch input', function () {
|
||||||
if ($(this).is(":checked")) {
|
if ($(this).is(":checked")) {
|
||||||
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').slideDown(200);
|
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').slideDown(200);
|
||||||
|
$(".mep_event_tab_location_content").hide(200);
|
||||||
} else {
|
} else {
|
||||||
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').val('').slideUp(200);
|
$(this).parents('label.mp_event_virtual_type_des_switch').siblings('label.mp_event_virtual_type_des').val('').slideUp(200);
|
||||||
|
$(".mep_event_tab_location_content").show(200);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on('click', 'label.mp_event_ticket_type_des_switch input', function () {
|
||||||
|
if ($(this).is(":checked")) {
|
||||||
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').slideDown(200);
|
||||||
|
$(".mep_ticket_type_setting_sec").hide(200);
|
||||||
|
} else {
|
||||||
|
// $(this).parents('label.mp_event_ticket_type_des_switch').siblings('label.mep_ticket_type_setting_sec').val('').slideUp(200);
|
||||||
|
$(".mep_ticket_type_setting_sec").show(200);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#add-row-t').on('click', function () {
|
$('#add-row-t').on('click', function () {
|
||||||
var row = $('.empty-row-t.screen-reader-text').clone(true);
|
var row = $('.empty-row-t.screen-reader-text').clone(true);
|
||||||
|
|
|
@ -860,3 +860,10 @@ Bug fixed
|
||||||
Quick Setup Page Added
|
Quick Setup Page Added
|
||||||
Bug fixed
|
Bug fixed
|
||||||
04 Aug 2022*
|
04 Aug 2022*
|
||||||
|
|
||||||
|
= 3.7.0=
|
||||||
|
* Update Release:
|
||||||
|
Rich Schmea Error issue fixed
|
||||||
|
Multiple Event Add to cart issue fixed
|
||||||
|
Bug fixed
|
||||||
|
04 Aug 2022*
|
|
@ -98,7 +98,7 @@ class MEPEventFaqtWidget extends Widget_Base {
|
||||||
foreach ($mep_event_faq as $field) {
|
foreach ($mep_event_faq as $field) {
|
||||||
?>
|
?>
|
||||||
<h3><?php if ($field['mep_faq_title'] != '') echo esc_attr($field['mep_faq_title']); ?></h3>
|
<h3><?php if ($field['mep_faq_title'] != '') echo esc_attr($field['mep_faq_title']); ?></h3>
|
||||||
<p><?php if ($field['mep_faq_content'] != '') echo esc_attr($field['mep_faq_content']); ?></p>
|
<p><?php if ($field['mep_faq_content'] != '') echo mep_esc_html(strip_tags(html_entity_decode($field['mep_faq_content']))); ?></p>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -197,9 +197,6 @@ class MEPEventScheduleWidget extends Widget_Base {
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->end_controls_section();
|
$this->end_controls_section();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
|
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
|
||||||
* 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: 3.6.9
|
* Version: 3.7.0
|
||||||
* 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
|
||||||
|
@ -36,7 +36,7 @@ if (is_plugin_active('woocommerce/woocommerce.php')) {
|
||||||
exit(wp_redirect(admin_url($slug)));
|
exit(wp_redirect(admin_url($slug)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
add_action('activated_plugin', 'mep_event_activation_redirect');
|
// add_action('activated_plugin', 'mep_event_activation_redirect');
|
||||||
require_once(dirname(__FILE__) . "/inc/mep_file_include.php");
|
require_once(dirname(__FILE__) . "/inc/mep_file_include.php");
|
||||||
|
|
||||||
// Get Plugin Data
|
// Get Plugin Data
|
||||||
|
|
Loading…
Reference in New Issue