version 3.5.3 released with security issue fixed

This commit is contained in:
magepeopleteam 2021-10-29 06:57:05 +00:00
parent 952609357e
commit 92a0417ded
25 changed files with 1009 additions and 1169 deletions

View File

@ -114,37 +114,38 @@ class MP_Event_All_Info_In_One
</div>
<script type="text/javascript">
jQuery(function($) {
$( "#mp_event_all_info_in_tab" ).parent().removeClass('meta-box-sortables');
$("#mp_event_all_info_in_tab").parent().removeClass('meta-box-sortables');
});
</script>
<?php
<?php
}
public function is_gutenberg_active() {
public function is_gutenberg_active()
{
$gutenberg = false;
$block_editor = false;
if ( has_filter( 'replace_editor', 'gutenberg_init' ) ) {
if (has_filter('replace_editor', 'gutenberg_init')) {
// Gutenberg is installed and activated.
$gutenberg = true;
}
if ( version_compare( $GLOBALS['wp_version'], '5.0-beta', '>' ) ) {
if (version_compare($GLOBALS['wp_version'], '5.0-beta', '>')) {
// Block editor.
$block_editor = true;
}
if ( ! $gutenberg && ! $block_editor ) {
if (!$gutenberg && !$block_editor) {
return false;
}
include_once ABSPATH . 'wp-admin/includes/plugin.php';
if ( ! is_plugin_active( 'classic-editor/classic-editor.php' ) ) {
if (!is_plugin_active('classic-editor/classic-editor.php')) {
return true;
}
$use_block_editor = ( get_option( 'classic-editor-replace' ) === 'no-replace' );
$use_block_editor = (get_option('classic-editor-replace') === 'no-replace');
return $use_block_editor;
}
@ -157,73 +158,73 @@ class MP_Event_All_Info_In_One
$map_type = mep_get_option('mep_google_map_type', 'general_setting_sec', 'iframe');
$mep_org_address = array_key_exists('mep_org_address', $values) ? $values['mep_org_address'][0] : 0;
$map_visible = array_key_exists('mep_sgm', $values) ? $values['mep_sgm'][0] : 0;
$author_id = get_post_field( 'post_author', $post_id );
$author_id = get_post_field('post_author', $post_id);
if($this->is_gutenberg_active()) { ?>
if ($this->is_gutenberg_active()) { ?>
<input type="hidden" name="post_author_gutenberg" value="<?php echo $author_id; ?>">
<?php }
?>
<div class="mp_ticket_type_table">
<table>
<tr>
<th style="min-width: 160px;"><?php _e( " Location Source:", "mage-eventpress" ); ?></th>
<td colspan="3" style="min-width: 450px;">
<label>
<select class="mp_formControl" name="mep_org_address">
<option value="0" <?php echo ( $mep_org_address == 0 ) ? 'selected' : ''; ?>><?php echo $event_label;
_e( ' Details', 'mage-eventpress' ); ?></option>
<option value="1" <?php echo ( $mep_org_address == 1 ) ? 'selected' : ''; ?>><?php _e( 'Organizer', 'mage-eventpress' ); ?></option>
</select>
</label>
<p class="event_meta_help_txt">
<?php _e( 'Select Organizer if you already save the organizer details. Please remember if you select orginizer and not checked the the organizer from the Event Organizer list from the right sidebar, Event Location section if the frontend will be blank.', 'mage-eventpress' ); ?>
</p>
</td>
</tr>
<tr class="mp_event_address">
<th><?php _e( 'Location/Venue:', 'mage-eventpress' ); ?></th>
<td>
<label>
<input type="text" name='mep_location_venue' placeholder="Ex: New york Meeting Center" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_location_venue' ); ?>'>
</label>
</td>
<th><span><?php _e( 'Street:', 'mage-eventpress' ); ?></span></th>
<td>
<label>
<input type="text" name='mep_street' placeholder="Ex: 10 E 33rd St" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_street' ); ?>'>
</label>
</td>
</tr>
<tr class="mp_event_address">
<th><span><?php _e( 'City: ', 'mage-eventpress' ); ?></span></th>
<td>
<label>
<input type="text" name='mep_city' placeholder="Ex: New York" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_city' ); ?>'>
</label>
</td>
<th><span><?php _e( 'State: ', 'mage-eventpress' ); ?></span></th>
<td>
<label>
<input type="text" name='mep_state' placeholder="Ex: NY" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_state' ); ?>'>
</label>
</td>
</tr>
<tr class="mp_event_address">
<th><span><?php _e( 'Postcode: ', 'mage-eventpress' ); ?></span></th>
<td>
<label>
<input type="text" name='mep_postcode' placeholder="Ex: 10016" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_postcode' ); ?>'>
</label>
</td>
<th><span><?php _e( 'Country: ', 'mage-eventpress' ); ?></span></th>
<td>
<label>
<input type="text" name='mep_country' placeholder="Ex: USA" class="mp_formControl" value='<?php echo mep_get_event_locaion_item( $post_id, 'mep_country' ); ?>'>
</label>
</td>
</tr>
</table>
</div>
?>
<div class="mp_ticket_type_table">
<table>
<tr>
<th style="min-width: 160px;"><?php _e(" Location Source:", "mage-eventpress"); ?></th>
<td colspan="3" style="min-width: 450px;">
<label>
<select class="mp_formControl" name="mep_org_address">
<option value="0" <?php echo ($mep_org_address == 0) ? 'selected' : ''; ?>><?php echo $event_label;
_e(' Details', 'mage-eventpress'); ?></option>
<option value="1" <?php echo ($mep_org_address == 1) ? 'selected' : ''; ?>><?php _e('Organizer', 'mage-eventpress'); ?></option>
</select>
</label>
<p class="event_meta_help_txt">
<?php _e('Select Organizer if you already save the organizer details. Please remember if you select orginizer and not checked the the organizer from the Event Organizer list from the right sidebar, Event Location section if the frontend will be blank.', 'mage-eventpress'); ?>
</p>
</td>
</tr>
<tr class="mp_event_address">
<th><?php _e('Location/Venue:', 'mage-eventpress'); ?></th>
<td>
<label>
<input type="text" name='mep_location_venue' placeholder="Ex: New york Meeting Center" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_location_venue'); ?>'>
</label>
</td>
<th><span><?php _e('Street:', 'mage-eventpress'); ?></span></th>
<td>
<label>
<input type="text" name='mep_street' placeholder="Ex: 10 E 33rd St" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_street'); ?>'>
</label>
</td>
</tr>
<tr class="mp_event_address">
<th><span><?php _e('City: ', 'mage-eventpress'); ?></span></th>
<td>
<label>
<input type="text" name='mep_city' placeholder="Ex: New York" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_city'); ?>'>
</label>
</td>
<th><span><?php _e('State: ', 'mage-eventpress'); ?></span></th>
<td>
<label>
<input type="text" name='mep_state' placeholder="Ex: NY" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_state'); ?>'>
</label>
</td>
</tr>
<tr class="mp_event_address">
<th><span><?php _e('Postcode: ', 'mage-eventpress'); ?></span></th>
<td>
<label>
<input type="text" name='mep_postcode' placeholder="Ex: 10016" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_postcode'); ?>'>
</label>
</td>
<th><span><?php _e('Country: ', 'mage-eventpress'); ?></span></th>
<td>
<label>
<input type="text" name='mep_country' placeholder="Ex: USA" class="mp_formControl" value='<?php echo mep_get_event_locaion_item($post_id, 'mep_country'); ?>'>
</label>
</td>
</tr>
</table>
</div>
<div class="mp_form_area">
<div class="mp_form_item">
@ -354,7 +355,6 @@ class MP_Event_All_Info_In_One
jQuery("input[name=longitude]").val(longitude);
});
}
google.maps.event.addDomListener(window, "load", initMap);
</script>
<?php
@ -404,129 +404,143 @@ class MP_Event_All_Info_In_One
$mep_event_ticket_type = get_post_meta($post_id, 'mep_event_ticket_type', true);
wp_nonce_field('mep_event_ticket_type_nonce', 'mep_event_ticket_type_nonce');
?>
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one-t">
<thead>
<tr>
<th style="min-width: 80px;" title="<?php _e('Ticket Type Name', 'mage-eventpress'); ?>"><?php _e('Ticket', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php _e('Ticket Price', 'mage-eventpress'); ?>"><?php _e('Price', 'mage-eventpress'); ?></th>
<?php do_action('mep_pricing_table_head_after_price_col'); ?>
<th style="min-width: 80px;" title="<?php _e('Available Qty', 'mage-eventpress'); ?>"><?php _e('Available', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php _e('Default Qty', 'mage-eventpress'); ?>"><?php _e('Default', 'mage-eventpress'); ?></th>
<?php echo $rsvqty = '<th style="min-width: 80px;" title="' . esc_html__("Reserve Qty", "mage-eventpress") . '">' . esc_html__("Reserve", "mage-eventpress") . '</th>';
apply_filters('mep_add_extra_column', $rsvqty); ?>
<th style="min-width: 150px;" title="<?php _e('Sale End Date', 'mage-eventpress'); ?>"><?php _e('Sale End Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;" title="<?php _e('Sale End Time', 'mage-eventpress'); ?>"><?php _e('Sale End Time', 'mage-eventpress'); ?></th>
<th style="min-width: 140px;" title="<?php _e('Qty Box Type', 'mage-eventpress'); ?>"><?php _e('Qty Box', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;"><?php _e('Action', 'mage-eventpress'); ?></th>
</tr>
</thead>
<tbody class="mp_event_type_sortable">
<?php
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one-t">
<thead>
<tr>
<th style="min-width: 80px;" title="<?php _e('Ticket Type Name', 'mage-eventpress'); ?>"><?php _e('Ticket', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php _e('Ticket Price', 'mage-eventpress'); ?>"><?php _e('Price', 'mage-eventpress'); ?></th>
<?php do_action('mep_pricing_table_head_after_price_col'); ?>
<th style="min-width: 80px;" title="<?php _e('Available Qty', 'mage-eventpress'); ?>"><?php _e('Available', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;" title="<?php _e('Default Qty', 'mage-eventpress'); ?>"><?php _e('Default', 'mage-eventpress'); ?></th>
<?php echo $rsvqty = '<th style="min-width: 80px;" title="' . esc_html__("Reserve Qty", "mage-eventpress") . '">' . esc_html__("Reserve", "mage-eventpress") . '</th>';
apply_filters('mep_add_extra_column', $rsvqty); ?>
<th style="min-width: 150px;" title="<?php _e('Sale End Date', 'mage-eventpress'); ?>"><?php _e('Sale End Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;" title="<?php _e('Sale End Time', 'mage-eventpress'); ?>"><?php _e('Sale End Time', 'mage-eventpress'); ?></th>
<th style="min-width: 140px;" title="<?php _e('Qty Box Type', 'mage-eventpress'); ?>"><?php _e('Qty Box', 'mage-eventpress'); ?></th>
<th style="min-width: 80px;"><?php _e('Action', 'mage-eventpress'); ?></th>
</tr>
</thead>
<tbody class="mp_event_type_sortable">
<?php
if ($mep_event_ticket_type) :
$count = 0;
foreach ($mep_event_ticket_type as $field) {
$qty_t_type = array_key_exists('option_qty_t_type',$field) ? esc_attr($field['option_qty_t_type']) : 'inputbox';
$count++;
?>
<tr>
<td>
<input type="text" class="mp_formControl" name="option_name_t[]" placeholder="Ex: Adult"
value="<?php if ($field['option_name_t'] != '') { echo esc_attr($field['option_name_t']);} ?>" />
</td>
if ($mep_event_ticket_type) :
$count = 0;
foreach ($mep_event_ticket_type as $field) {
$qty_t_type = array_key_exists('option_qty_t_type', $field) ? esc_attr($field['option_qty_t_type']) : 'inputbox';
$count++;
?>
<tr>
<td>
<input type="text" class="mp_formControl" name="option_name_t[]" placeholder="Ex: Adult" value="<?php if ($field['option_name_t'] != '') {
echo esc_attr($field['option_name_t']);
} ?>" />
</td>
<td>
<input type="number" size="4" pattern="[0-9]*" step="0.001" class="mp_formControl" name="option_price_t[]" placeholder="Ex: 10"
value="<?php if (array_key_exists('option_price_t', $field) && $field['option_price_t'] != '') {echo esc_attr($field['option_price_t']);} else {echo '';} ?>" />
</td>
<?php do_action('mep_pricing_table_data_after_price_col',$field,$post_id); ?>
<td>
<input type="number" size="4" pattern="[0-9]*" step="1" class="mp_formControl" name="option_qty_t[]" placeholder="Ex: 500"
value="<?php if (isset($field['option_qty_t'])) {echo $field['option_qty_t'];} else {echo 0;} ?>" />
</td>
<td>
<input type="number" size="2" pattern="[0-9]*" step="1" class="mp_formControl" name="option_default_qty_t[]" placeholder="Ex: 1"
value="<?php if (isset($field['option_default_qty_t'])) {echo $field['option_default_qty_t'];} else {echo 0;} ?>" />
</td>
<td>
<input type="number" class="mp_formControl" name="option_rsv_t[]" placeholder="Ex: 5"
value="<?php if (isset($field['option_rsv_t'])) {echo $field['option_rsv_t'];} else {echo 0;} ?>" />
</td>
<td>
<input type="number" size="4" pattern="[0-9]*" step="0.001" class="mp_formControl" name="option_price_t[]" placeholder="Ex: 10" value="<?php if (array_key_exists('option_price_t', $field) && $field['option_price_t'] != '') {
echo esc_attr($field['option_price_t']);
} else {
echo '';
} ?>" />
</td>
<?php do_action('mep_pricing_table_data_after_price_col', $field, $post_id); ?>
<td>
<input type="number" size="4" pattern="[0-9]*" step="1" class="mp_formControl" name="option_qty_t[]" placeholder="Ex: 500" value="<?php if (isset($field['option_qty_t'])) {
echo $field['option_qty_t'];
} else {
echo 0;
} ?>" />
</td>
<td>
<input type="number" size="2" pattern="[0-9]*" step="1" class="mp_formControl" name="option_default_qty_t[]" placeholder="Ex: 1" value="<?php if (isset($field['option_default_qty_t'])) {
echo $field['option_default_qty_t'];
} else {
echo 0;
} ?>" />
</td>
<td>
<input type="number" class="mp_formControl" name="option_rsv_t[]" placeholder="Ex: 5" value="<?php if (isset($field['option_rsv_t'])) {
echo $field['option_rsv_t'];
} else {
echo 0;
} ?>" />
</td>
<?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 (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>
</td>
<td>
<div class="sell_expire_date">
<?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 (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>
</td>
<td>
<div class="sell_expire_date">
<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>
</td>
<td>
<select name="option_qty_t_type[]" class='mp_formControl'>
<option value="inputbox" <?php if ( $qty_t_type == 'inputbox' ) {
echo "Selected";
} ?>><?php _e( 'Input Box', 'mage-eventpress' ); ?></option>
<option value="dropdown" <?php if ( $qty_t_type == 'dropdown' ) {
echo "Selected";
} ?>><?php _e( 'Dropdown List', 'mage-eventpress' ); ?></option>
</select>
</td>
<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>
</td>
<td>
<select name="option_qty_t_type[]" class='mp_formControl'>
<option value="inputbox" <?php if ($qty_t_type == 'inputbox') {
echo "Selected";
} ?>><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown" <?php if ($qty_t_type == 'dropdown') {
echo "Selected";
} ?>><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select>
</td>
<td>
<div class="mp_event_remove_move">
<button class="button remove-row-t" type="button"><span class="dashicons dashicons-trash"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
// show a blank one
endif;
?>
<td>
<div class="mp_event_remove_move">
<button class="button remove-row-t" type="button"><span class="dashicons dashicons-trash"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
// show a blank one
endif;
?>
<!-- empty hidden one for jQuery -->
<tr class="empty-row-t screen-reader-text">
<td><input type="text" class="mp_formControl" name="option_name_t[]" placeholder="Ex: Adult" /></td>
<td><input type="number" size="4" pattern="[0-9]*" class="mp_formControl" step="0.001" name="option_price_t[]" placeholder="Ex: 10" value="" /></td>
<?php do_action('mep_pricing_table_empty_after_price_col'); ?>
<td><input type="number" size="4" pattern="[0-9]*" step="1" class="mp_formControl" name="option_qty_t[]" placeholder="Ex: 15" value="" /></td>
<td><input type="number" size="2" pattern="[0-9]*" class="mp_formControl" name="option_default_qty_t[]" placeholder="Ex: 1" value="" /></td>
<?php echo $option_rsv_t = '<td><input type="number" class="mp_formControl" name="option_rsv_t[]" placeholder="Ex: 5" value=""/></td>' ?>
<?php apply_filters('mep_add_field_to_ticket_type', $option_rsv_t); ?>
<td>
<div class="sell_expire_date">
<input type="date" id="ticket_sale_start_date" value='' name="option_sale_end_date[]" />
</div>
</td>
<td>
<div class="sell_expire_date">
<input type="time" id="ticket_sale_start_time" value='' name="option_sale_end_time[]" />
</div>
</td>
<td>
<select name="option_qty_t_type[]" class='mp_formControl'>
<option value=''><?php _e('Please Select', 'mage-eventpress'); ?></option>
<option value="inputbox"><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown"><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select></td>
<td>
<button class="button remove-row-t" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
</td>
</tr>
</tbody>
</table>
</div>
<!-- empty hidden one for jQuery -->
<tr class="empty-row-t screen-reader-text">
<td><input type="text" class="mp_formControl" name="option_name_t[]" placeholder="Ex: Adult" /></td>
<td><input type="number" size="4" pattern="[0-9]*" class="mp_formControl" step="0.001" name="option_price_t[]" placeholder="Ex: 10" value="" /></td>
<?php do_action('mep_pricing_table_empty_after_price_col'); ?>
<td><input type="number" size="4" pattern="[0-9]*" step="1" class="mp_formControl" name="option_qty_t[]" placeholder="Ex: 15" value="" /></td>
<td><input type="number" size="2" pattern="[0-9]*" class="mp_formControl" name="option_default_qty_t[]" placeholder="Ex: 1" value="" /></td>
<?php echo $option_rsv_t = '<td><input type="number" class="mp_formControl" name="option_rsv_t[]" placeholder="Ex: 5" value=""/></td>' ?>
<?php apply_filters('mep_add_field_to_ticket_type', $option_rsv_t); ?>
<td>
<div class="sell_expire_date">
<input type="date" id="ticket_sale_start_date" value='' name="option_sale_end_date[]" />
</div>
</td>
<td>
<div class="sell_expire_date">
<input type="time" id="ticket_sale_start_time" value='' name="option_sale_end_time[]" />
</div>
</td>
<td>
<select name="option_qty_t_type[]" class='mp_formControl'>
<option value=''><?php _e('Please Select', 'mage-eventpress'); ?></option>
<option value="inputbox"><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown"><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select>
</td>
<td>
<button class="button remove-row-t" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<button id="add-row-t" class="button" style="background:green; color:white;"><span class="dashicons dashicons-plus-alt" style="margin-top: 3px;color: white;"></span><?php _e('Add New Ticket Type', 'mage-eventpress'); ?></button>
</p>
@ -540,83 +554,83 @@ class MP_Event_All_Info_In_One
wp_nonce_field('mep_events_extra_price_nonce', 'mep_events_extra_price_nonce');
?>
<p class="event_meta_help_txt"><?php _e('Extra Service as Product that you can sell and it is not included on event package', 'mage-eventpress'); ?></p>
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one">
<thead>
<tr>
<th title="<?php _e('Extra Service Name', 'mage-eventpress'); ?>"><?php _e('Name', 'mage-eventpress'); ?></th>
<th title="<?php _e('Extra Service Price', 'mage-eventpress'); ?>"><?php _e('Price', 'mage-eventpress'); ?></th>
<th title="<?php _e('Available Qty', 'mage-eventpress'); ?>"><?php _e('Available', 'mage-eventpress'); ?></th>
<th title="<?php _e('Qty Box Type', 'mage-eventpress'); ?>" style="min-width: 140px;"><?php _e('Qty Box', 'mage-eventpress'); ?></th>
<th></th>
</tr>
</thead>
<tbody class="mp_event_type_sortable">
<?php
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one">
<thead>
<tr>
<th title="<?php _e('Extra Service Name', 'mage-eventpress'); ?>"><?php _e('Name', 'mage-eventpress'); ?></th>
<th title="<?php _e('Extra Service Price', 'mage-eventpress'); ?>"><?php _e('Price', 'mage-eventpress'); ?></th>
<th title="<?php _e('Available Qty', 'mage-eventpress'); ?>"><?php _e('Available', 'mage-eventpress'); ?></th>
<th title="<?php _e('Qty Box Type', 'mage-eventpress'); ?>" style="min-width: 140px;"><?php _e('Qty Box', 'mage-eventpress'); ?></th>
<th></th>
</tr>
</thead>
<tbody class="mp_event_type_sortable">
<?php
if ($mep_events_extra_prices) :
if ($mep_events_extra_prices) :
foreach ($mep_events_extra_prices as $field) {
$qty_type = array_key_exists('option_qty_type',$field) ? esc_attr($field['option_qty_type']) : 'inputbox';
?>
<tr>
<td><input type="text" class="mp_formControl" name="option_name[]" placeholder="Ex: Cap" value="<?php if ($field['option_name'] != '') {
echo esc_attr($field['option_name']);
} ?>" /></td>
<td><input type="number" step="0.001" class="mp_formControl" name="option_price[]" placeholder="Ex: 10" value="<?php if ($field['option_price'] != '') {
echo esc_attr($field['option_price']);
} else {
echo '';
} ?>" /></td>
<td><input type="number" class="mp_formControl" name="option_qty[]" placeholder="Ex: 100" value="<?php if ($field['option_qty'] != '') {
echo esc_attr($field['option_qty']);
} else {
echo '';
foreach ($mep_events_extra_prices as $field) {
$qty_type = array_key_exists('option_qty_type', $field) ? esc_attr($field['option_qty_type']) : 'inputbox';
?>
<tr>
<td><input type="text" class="mp_formControl" name="option_name[]" placeholder="Ex: Cap" value="<?php if ($field['option_name'] != '') {
echo esc_attr($field['option_name']);
} ?>" /></td>
<td align="center">
<select name="option_qty_type[]" class='mp_formControl'>
<option value="inputbox" <?php if ($qty_type == 'inputbox') {
echo "Selected";
} ?>><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown" <?php if ($qty_type == 'dropdown') {
echo "Selected";
} ?>><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select>
</td>
<td>
<div class="mp_event_remove_move">
<button class="button remove-row" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
// show a blank one
endif;
?>
<!-- empty hidden one for jQuery -->
<tr class="empty-row screen-reader-text">
<td><input type="text" class="mp_formControl" name="option_name[]" placeholder="Ex: Cap" /></td>
<td><input type="number" class="mp_formControl" step="0.001" name="option_price[]" placeholder="Ex: 10" value="" /></td>
<td><input type="number" class="mp_formControl" name="option_qty[]" placeholder="Ex: 100" value="" /></td>
<td><input type="number" step="0.001" class="mp_formControl" name="option_price[]" placeholder="Ex: 10" value="<?php if ($field['option_price'] != '') {
echo esc_attr($field['option_price']);
} else {
echo '';
} ?>" /></td>
<td><select name="option_qty_type[]" class='mp_formControl'>
<option value=""><?php _e('Please Select Type', 'mage-eventpress'); ?></option>
<option value="inputbox"><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown"><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select></td>
<td>
<button class="button remove-row"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
</td>
</tr>
</tbody>
</table>
</div>
<td><input type="number" class="mp_formControl" name="option_qty[]" placeholder="Ex: 100" value="<?php if ($field['option_qty'] != '') {
echo esc_attr($field['option_qty']);
} else {
echo '';
} ?>" /></td>
<td align="center">
<select name="option_qty_type[]" class='mp_formControl'>
<option value="inputbox" <?php if ($qty_type == 'inputbox') {
echo "Selected";
} ?>><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown" <?php if ($qty_type == 'dropdown') {
echo "Selected";
} ?>><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select>
</td>
<td>
<div class="mp_event_remove_move">
<button class="button remove-row" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
// show a blank one
endif;
?>
<!-- empty hidden one for jQuery -->
<tr class="empty-row screen-reader-text">
<td><input type="text" class="mp_formControl" name="option_name[]" placeholder="Ex: Cap" /></td>
<td><input type="number" class="mp_formControl" step="0.001" name="option_price[]" placeholder="Ex: 10" value="" /></td>
<td><input type="number" class="mp_formControl" name="option_qty[]" placeholder="Ex: 100" value="" /></td>
<td><select name="option_qty_type[]" class='mp_formControl'>
<option value=""><?php _e('Please Select Type', 'mage-eventpress'); ?></option>
<option value="inputbox"><?php _e('Input Box', 'mage-eventpress'); ?></option>
<option value="dropdown"><?php _e('Dropdown List', 'mage-eventpress'); ?></option>
</select></td>
<td>
<button class="button remove-row"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
</td>
</tr>
</tbody>
</table>
</div>
<p>
<button id="add-row" class="button" style="background:green; color:white;"><span class="dashicons dashicons-plus-alt" style="margin-top: 3px;color: white;"></span><?php _e('Add Extra Price', 'mage-eventpress'); ?></button>
</p>
@ -628,108 +642,108 @@ class MP_Event_All_Info_In_One
$values = get_post_custom($post_id);
?>
<div class="sec">
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one-d">
<thead>
<th style="min-width: 120px;"><?php _e('Start Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('Start Time', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('End Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('End Time', 'mage-eventpress'); ?></th>
<?php do_action('mep_date_table_head',$post_id); ?>
<th style="min-width: 60px;"><?php _e('Action', 'mage-eventpress'); ?></th>
</thead>
<tbody class="mp_event_type_sortable">
<tr>
<td>
<input type="date" class="mp_formControl" name="event_start_date" placeholder="Start Date" value="<?php if (array_key_exists('event_start_date', $values)) {
echo $values['event_start_date'][0];
<div class="mp_ticket_type_table">
<table id="repeatable-fieldset-one-d">
<thead>
<th style="min-width: 120px;"><?php _e('Start Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('Start Time', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('End Date', 'mage-eventpress'); ?></th>
<th style="min-width: 120px;"><?php _e('End Time', 'mage-eventpress'); ?></th>
<?php do_action('mep_date_table_head', $post_id); ?>
<th style="min-width: 60px;"><?php _e('Action', 'mage-eventpress'); ?></th>
</thead>
<tbody class="mp_event_type_sortable">
<tr>
<td>
<input type="date" class="mp_formControl" name="event_start_date" placeholder="Start Date" value="<?php if (array_key_exists('event_start_date', $values)) {
echo $values['event_start_date'][0];
} ?>" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_start_time" placeholder="Start Time" value="<?php if (array_key_exists('event_start_time', $values)) {
echo $values['event_start_time'][0];
} ?>" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_end_date" placeholder="End Date" value="<?php if (array_key_exists('event_end_date', $values)) {
echo $values['event_end_date'][0];
} ?>" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_start_time" placeholder="Start Time" value="<?php if (array_key_exists('event_start_time', $values)) {
echo $values['event_start_time'][0];
</td>
<td>
<input type="time" class="mp_formControl" name="event_end_time" placeholder="End Time" value="<?php if (array_key_exists('event_end_time', $values)) {
echo date('H:i', strtotime($values['event_end_time'][0]));
} ?>" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_end_date" placeholder="End Date" value="<?php if (array_key_exists('event_end_date', $values)) {
echo $values['event_end_date'][0];
} ?>" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_end_time" placeholder="End Time" value="<?php if (array_key_exists('event_end_time', $values)) {
echo date('H:i', strtotime($values['event_end_time'][0]));
} ?>" />
</td>
<?php do_action('mep_date_table_body_default_date',$post_id); ?>
<td>
</td>
</tr>
<?php
$mep_event_multi_date = get_post_meta($post_id, 'mep_event_more_date', true);
if ($mep_event_multi_date) :
?>
</td>
<?php do_action('mep_date_table_body_default_date', $post_id); ?>
<td>
</td>
</tr>
<?php
foreach ($mep_event_multi_date as $field) {
$mep_event_multi_date = get_post_meta($post_id, 'mep_event_more_date', true);
if ($mep_event_multi_date) :
?>
<tr>
<td>
<input type="date" class="mp_formControl" name="event_more_start_date[]" placeholder="Start Date" value="<?php if ($field['event_more_start_date'] != '') {
echo date('Y-m-d', strtotime($field['event_more_start_date']));
<?php
foreach ($mep_event_multi_date as $field) {
?>
<tr>
<td>
<input type="date" class="mp_formControl" name="event_more_start_date[]" placeholder="Start Date" value="<?php if ($field['event_more_start_date'] != '') {
echo date('Y-m-d', strtotime($field['event_more_start_date']));
} ?>" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_start_time[]" placeholder="Start Time" value="<?php if ($field['event_more_start_time'] != '') {
echo date('H:i', strtotime($field['event_more_start_time']));
} ?>" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_more_end_date[]" placeholder="End Date" value="<?php if ($field['event_more_end_date'] != '') {
echo date('Y-m-d', strtotime($field['event_more_end_date']));
} ?>" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_start_time[]" placeholder="Start Time" value="<?php if ($field['event_more_start_time'] != '') {
echo date('H:i', strtotime($field['event_more_start_time']));
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="<?php if ($field['event_more_end_time'] != '') {
echo date('H:i', strtotime($field['event_more_end_time']));
} ?>" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_more_end_date[]" placeholder="End Date" value="<?php if ($field['event_more_end_date'] != '') {
echo date('Y-m-d', strtotime($field['event_more_end_date']));
} ?>" />
</td>
<td>
</td>
<?php do_action('mep_date_table_body_more_date', $post_id, $field); ?>
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="<?php if ($field['event_more_end_time'] != '') {
echo date('H:i', strtotime($field['event_more_end_time']));
} ?>" />
</td>
<?php do_action('mep_date_table_body_more_date',$post_id, $field); ?>
<td>
<div class="mp_event_remove_move">
<button class="button remove-row-d" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
endif;
?>
<tr class="empty-row-d screen-reader-text">
<td>
<div class="mp_event_remove_move">
<button class="button remove-row-d" type="button"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span></button>
<div class="mp_event_type_sortable_button"><span class="dashicons dashicons-move"></span></div>
</div>
</td>
</tr>
<?php
}
else :
endif;
?>
<tr class="empty-row-d screen-reader-text">
<td>
<input type="date" class="mp_formControl" name="event_more_start_date[]" placeholder="Start Date" value="" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_start_time[]" placeholder="Start Time" value="" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_more_end_date[]" placeholder="End Date" value="" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="" />
</td>
<?php do_action('mep_date_table_empty',$post_id); ?>
<td>
<button class="button remove-row-d"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
</td>
</tr>
</tbody>
</table>
</div>
<td>
<input type="date" class="mp_formControl" name="event_more_start_date[]" placeholder="Start Date" value="" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_start_time[]" placeholder="Start Time" value="" />
</td>
<td>
<input type="date" class="mp_formControl" name="event_more_end_date[]" placeholder="End Date" value="" />
</td>
<td>
<input type="time" class="mp_formControl" name="event_more_end_time[]" placeholder="End Time" value="" />
</td>
<?php do_action('mep_date_table_empty', $post_id); ?>
<td>
<button class="button remove-row-d"><span class="dashicons dashicons-trash" style="margin-top: 3px;color: red;"></span><?php _e('Remove', 'mage-eventpress'); ?></button>
</td>
</tr>
</tbody>
</table>
</div>
<button id="add-new-date-row" class="button" style="background:green; color:white;"><span class="dashicons dashicons-plus-alt" style="margin-top: 3px;color: white;"></span><?php _e('Add More Dates', 'mage-eventpress'); ?></button>
</div>
@ -751,15 +765,19 @@ class MP_Event_All_Info_In_One
$rt_status = get_post_meta($post_id, 'mep_rich_text_status', true) ? get_post_meta($post_id, 'mep_rich_text_status', true) : 'enable';
?>
<div class='mep_rich_text_status_section'>
<label for='mep_rich_text_status'>
<?php _e('Rich Text Status','mage-eventpress'); ?>
<select id='mep_rich_text_status' name='mep_rich_text_status'>
<option value='enable' <?php if($rt_status == 'enable'){ echo 'Selected'; } ?>><?php _e('Enable','mage-eventpress'); ?></option>
<option value='disable' <?php if($rt_status == 'disable'){ echo 'Selected'; } ?>><?php _e('Disable','mage-eventpress'); ?></option>
</select>
</label>
<label for='mep_rich_text_status'>
<?php _e('Rich Text Status', 'mage-eventpress'); ?>
<select id='mep_rich_text_status' name='mep_rich_text_status'>
<option value='enable' <?php if ($rt_status == 'enable') {
echo 'Selected';
} ?>><?php _e('Enable', 'mage-eventpress'); ?></option>
<option value='disable' <?php if ($rt_status == 'disable') {
echo 'Selected';
} ?>><?php _e('Disable', 'mage-eventpress'); ?></option>
</select>
</label>
</div>
<table id='mep_rich_text_table' <?php if($rt_status == 'disable'){ ?> style='display:none;' <?php } ?>>
<table id='mep_rich_text_table' <?php if ($rt_status == 'disable') { ?> style='display:none;' <?php } ?>>
<tr>
<th><span><?php _e('Type :', 'mage-eventpress'); ?></span></th>
<td colspan="3"><?php _e('Event', 'mage-eventpress'); ?></td>
@ -826,11 +844,10 @@ class MP_Event_All_Info_In_One
<script>
jQuery('[name="mep_rich_text_status"]').change(function() {
var rich_status = jQuery(this).val() ? jQuery(this).val() : 'enable';
if(rich_status == 'enable'){
if (rich_status == 'enable') {
// mep_rich_text_table
jQuery('#mep_rich_text_table').show(500);
}
else if(rich_status == 'disable'){
} else if (rich_status == 'disable') {
jQuery('#mep_rich_text_table').hide(500);
}
});
@ -902,7 +919,7 @@ class MP_Event_All_Info_In_One
<th title="<?php _e('Event SKU No:', 'mage-eventpress'); ?>"><span><?php _e('SKU No:', 'mage-eventpress'); ?></span></th>
<td colspan="3">
<label>
<input class="mep_input_text" type="text" name="mep_event_sku" value="<?php echo get_post_meta($post_id,'_sku',true); ?>" />
<input class="mep_input_text" type="text" name="mep_event_sku" value="<?php echo get_post_meta($post_id, '_sku', true); ?>" />
</label>
</td>
</tr>
@ -983,7 +1000,8 @@ class MP_Event_All_Info_In_One
// print_r($saved_user_role);
?>
<tr>
<th><span><?php _e('Virtual ', 'mage-eventpress'); echo $event_label.'?'; ?></span></th>
<th><span><?php _e('Virtual ', 'mage-eventpress');
echo $event_label . '?'; ?></span></th>
<td colspan="3">
<label class="mp_event_virtual_type_des_switch">
<input class="mp_opacity_zero" type="checkbox" name="mep_event_type" <?php echo $checked; ?> />
@ -991,7 +1009,7 @@ class MP_Event_All_Info_In_One
</label>
<p></p>
<label class="mp_event_virtual_type_des <?php echo ($event_type == 'online') ? 'active' : ''; ?>">
<?php wp_editor( htmlspecialchars_decode($description), 'mp_event_virtual_type_des' ); ?>
<?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>
@ -1006,7 +1024,9 @@ class MP_Event_All_Info_In_One
<p></p>
<label class="mp_event_virtual_type_des <?php echo ($event_member_type == 'member_only') ? 'active' : ''; ?>">
<select name='mep_member_only_user_role[]' multiple>
<option value="all" <?php if ( in_array('all',$saved_user_role)) { echo 'Selected'; } ?>><?php _e('For Any Logged in user', 'mage-eventpress'); ?> </option>
<option value="all" <?php if (in_array('all', $saved_user_role)) {
echo 'Selected';
} ?>><?php _e('For Any Logged in user', 'mage-eventpress'); ?> </option>
<?php echo mep_get_user_list($saved_user_role); ?>
</select>
</label>
@ -1118,14 +1138,14 @@ function mep_events_ticket_type_save($post_id)
$old = get_post_meta($post_id, 'mep_event_ticket_type', true) ? get_post_meta($post_id, 'mep_event_ticket_type', true) : array();
$new = array();
$names = $_POST['option_name_t'] ? $_POST['option_name_t'] : array();
$ticket_price = $_POST['option_price_t'] ? $_POST['option_price_t'] : array();
$qty = $_POST['option_qty_t'] ? $_POST['option_qty_t'] : array();
$dflt_qty = $_POST['option_default_qty_t'] ? $_POST['option_default_qty_t'] : array();
$rsv = $_POST['option_rsv_t'] ? $_POST['option_rsv_t'] : array();
$qty_type = $_POST['option_qty_t_type'] ? $_POST['option_qty_t_type'] : array();
$sale_end_date = $_POST['option_sale_end_date'] ? $_POST['option_sale_end_date'] : array();
$sale_end_time = $_POST['option_sale_end_time'] ? $_POST['option_sale_end_time'] : array();
$names = $_POST['option_name_t'] ? mage_array_strip($_POST['option_name_t']) : array();
$ticket_price = $_POST['option_price_t'] ? mage_array_strip($_POST['option_price_t']) : array();
$qty = $_POST['option_qty_t'] ? mage_array_strip($_POST['option_qty_t']) : array();
$dflt_qty = $_POST['option_default_qty_t'] ? mage_array_strip($_POST['option_default_qty_t']) : array();
$rsv = $_POST['option_rsv_t'] ? mage_array_strip($_POST['option_rsv_t']) : array();
$qty_type = $_POST['option_qty_t_type'] ? mage_array_strip($_POST['option_qty_t_type']) : array();
$sale_end_date = $_POST['option_sale_end_date'] ? mage_array_strip($_POST['option_sale_end_date']) : array();
$sale_end_time = $_POST['option_sale_end_time'] ? mage_array_strip($_POST['option_sale_end_time']) : array();
$count = count($names);
@ -1164,9 +1184,8 @@ function mep_events_ticket_type_save($post_id)
endif;
if ($sale_end_date[$i] != '') :
$new[$i]['option_sale_end_date_t'] = stripslashes(strip_tags($sale_end_date[$i].' '.$sale_end_time[$i]));
$new[$i]['option_sale_end_date_t'] = stripslashes(strip_tags($sale_end_date[$i] . ' ' . $sale_end_time[$i]));
endif;
}
$ticket_type_list = apply_filters('mep_ticket_type_arr_save', $new);
@ -1201,13 +1220,13 @@ function mep_events_repeatable_meta_box_save($post_id)
if (get_post_type($post_id) == 'mep_events') {
// mage_array_strip(
$old = get_post_meta($post_id, 'mep_events_extra_prices', true);
$new = array();
$names = $_POST['option_name'];
$urls = $_POST['option_price'];
$qty = $_POST['option_qty'];
$qty_type = $_POST['option_qty_type'];
$names = isset($_POST['option_name']) ? mage_array_strip($_POST['option_name']) : [];
$urls = isset($_POST['option_price']) ? mage_array_strip($_POST['option_price']) : [];
$qty = isset($_POST['option_qty']) ? mage_array_strip($_POST['option_qty']) : [];
$qty_type = isset($_POST['option_qty_type']) ? mage_array_strip($_POST['']) : [];
$order_id = 0;
$count = count($names);
@ -1267,14 +1286,14 @@ function mep_event_meta_save($post_id)
$pid = $post_id;
$oldm = get_post_meta($post_id, 'mep_event_more_date', true);
$more_start_date = isset($_POST['event_more_start_date']) ? $_POST['event_more_start_date'] : array();
$more_start_time = isset($_POST['event_more_start_time']) ? $_POST['event_more_start_time'] : '';
$more_end_date = isset($_POST['event_more_end_date']) ? $_POST['event_more_end_date'] : '';
$more_end_time = isset($_POST['event_more_end_time']) ? $_POST['event_more_end_time'] : '';
$more_start_date = isset($_POST['event_more_start_date']) ? mage_array_strip($_POST['event_more_start_date']) : array();
$more_start_time = isset($_POST['event_more_start_time']) ? mage_array_strip($_POST['event_more_start_time']) : '';
$more_end_date = isset($_POST['event_more_end_date']) ? mage_array_strip($_POST['event_more_end_date']) : '';
$more_end_time = isset($_POST['event_more_end_time']) ? mage_array_strip($_POST['event_more_end_time']) : '';
$mdate = [];
if(isset($_POST['post_author_gutenberg'])) {
$wpdb->get_results( "UPDATE ".$table_name." SET post_author=".$_POST['post_author_gutenberg']." WHERE ID=".$pid );
if (isset($_POST['post_author_gutenberg'])) {
$wpdb->get_results("UPDATE " . $table_name . " SET post_author=" . $_POST['post_author_gutenberg'] . " WHERE ID=" . $pid);
}
$mcount = count($more_start_date);
@ -1342,7 +1361,7 @@ function mep_event_meta_save($post_id)
$mep_available_seat = isset($_POST['mep_available_seat']) ? sanitize_text_field($_POST['mep_available_seat']) : 'off';
$_tax_status = isset($_POST['_tax_status']) ? sanitize_text_field($_POST['_tax_status']) : 'none';
$_tax_class = isset($_POST['_tax_class']) ? sanitize_text_field($_POST['_tax_class']) : '';
$mep_member_only_user_role = isset($_POST['mep_member_only_user_role']) ? maybe_unserialize( $_POST['mep_member_only_user_role']) : maybe_unserialize(array('all'));
$mep_member_only_user_role = isset($_POST['mep_member_only_user_role']) ? mage_array_strip(maybe_unserialize($_POST['mep_member_only_user_role'])) : maybe_unserialize(array('all'));
$sku = isset($_POST['mep_event_sku']) ? sanitize_text_field($_POST['mep_event_sku']) : $post_id;
$mep_rich_text_status = isset($_POST['mep_rich_text_status']) ? sanitize_text_field($_POST['mep_rich_text_status']) : 'enable';
@ -1416,7 +1435,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']) ? htmlspecialchars($_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

@ -18,7 +18,7 @@ function mep_basic_before_cart_add_validation($passed)
$event_id = $product_id;
if (get_post_type($event_id) == 'mep_events') {
$not_in_the_cart = apply_filters('mep_check_product_into_cart',true,$wc_product_id);
$not_in_the_cart = apply_filters('mep_check_product_into_cart', true, $wc_product_id);
if (!$not_in_the_cart) {
wc_add_notice("Sorry, This Event already added into the cart. Please First remove this event from the cart to add it again.", 'error');
$passed = false;
@ -32,9 +32,9 @@ add_filter('woocommerce_add_to_cart_validation', 'mep_basic_before_cart_add_vali
/**
* This Function Recieve the date from user selection and add them into the cart session data
*/
/**
* This Function Recieve the date from user selection and add them into the cart session data
*/
function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $variation_id)
{
@ -48,52 +48,46 @@ function mep_add_custom_fields_text_to_cart_item($cart_item_data, $product_id, $
*/
$total_price = get_post_meta($product_id, '_price', true);
$form_position = mep_get_option('mep_user_form_position', 'general_attendee_sec', 'details_page');
$mep_event_start_date = isset($_POST['mep_event_start_date']) ? $_POST['mep_event_start_date'] : array();
$event_cart_location = isset($_POST['mep_event_location_cart']) ? $_POST['mep_event_location_cart'] : array();
$event_cart_date = isset($_POST['mep_event_date_cart']) ? $_POST['mep_event_date_cart'] : array();
$recurring_event_date = $recurring == 'yes' && isset($_POST['recurring_event_date']) ? $_POST['recurring_event_date'] : array();
$ticket_type_arr = mep_cart_ticket_type('ticket_type', $total_price,$product_id);
$total_price = mep_cart_ticket_type('ticket_price', $total_price,$product_id);
$event_extra = mep_cart_event_extra_service('event_extra_service', $total_price,$product_id);
$total_price = mep_cart_event_extra_service('ticket_price', $total_price,$product_id);
$mep_event_start_date = isset($_POST['mep_event_start_date']) ? mage_array_strip($_POST['mep_event_start_date']) : array();
$event_cart_location = isset($_POST['mep_event_location_cart']) ? mage_array_strip($_POST['mep_event_location_cart']) : array();
$event_cart_date = isset($_POST['mep_event_date_cart']) ? mage_array_strip($_POST['mep_event_date_cart']) : array();
$recurring_event_date = $recurring == 'yes' && isset($_POST['recurring_event_date']) ? mage_array_strip($_POST['recurring_event_date']) : array();
$ticket_type_arr = mep_cart_ticket_type('ticket_type', $total_price, $product_id);
$total_price = mep_cart_ticket_type('ticket_price', $total_price, $product_id);
$event_extra = mep_cart_event_extra_service('event_extra_service', $total_price, $product_id);
$total_price = mep_cart_event_extra_service('ticket_price', $total_price, $product_id);
$user = $form_position == 'details_page' ? mep_save_attendee_info_into_cart($product_id) : array();
$validate = mep_cart_ticket_type('validation_data', $total_price,$product_id);
// print_r($ticket_type_arr);
// die();
$validate = mep_cart_ticket_type('validation_data', $total_price, $product_id);
/**
* Now Store the datas into Cart Session
*/
$time_slot_text = isset($_REQUEST['time_slot_name']) ? $_REQUEST['time_slot_name'] : '';
if(!empty($time_slot_text)){
$cart_item_data['event_everyday_time_slot'] = $time_slot_text;
if (!empty($time_slot_text)) {
$cart_item_data['event_everyday_time_slot'] = $time_slot_text;
}
$cart_item_data['event_ticket_info'] = $ticket_type_arr;
$cart_item_data['event_validate_info'] = $validate;
$cart_item_data['event_user_info'] = $user;
$cart_item_data['event_tp'] = $total_price;
$cart_item_data['line_total'] = $total_price;
$cart_item_data['line_subtotal'] = $total_price;
$cart_item_data['event_extra_service'] = $event_extra;
$cart_item_data['event_cart_location'] = $event_cart_location;
$cart_item_data['event_cart_date'] = $mep_event_start_date[0];
$cart_item_data['event_recurring_date'] = array_unique($recurring_event_date);
$cart_item_data['event_ticket_info'] = $ticket_type_arr;
$cart_item_data['event_validate_info'] = $validate;
$cart_item_data['event_user_info'] = $user;
$cart_item_data['event_tp'] = $total_price;
$cart_item_data['line_total'] = $total_price;
$cart_item_data['line_subtotal'] = $total_price;
$cart_item_data['event_extra_service'] = $event_extra;
$cart_item_data['event_cart_location'] = $event_cart_location;
$cart_item_data['event_cart_date'] = $mep_event_start_date[0];
$cart_item_data['event_recurring_date'] = array_unique($recurring_event_date);
$cart_item_data['event_recurring_date_arr'] = $recurring_event_date;
$cart_item_data['event_cart_display_date'] = $mep_event_start_date[0];
do_action('mep_event_cart_data_reg');
$cart_item_data['event_id'] = $product_id;
$cart_item_data['event_id'] = $product_id;
return apply_filters('mep_event_cart_item_data',$cart_item_data,$product_id,$total_price,$user,$ticket_type_arr,$event_extra);
}else{
return $cart_item_data;
}
return apply_filters('mep_event_cart_item_data', $cart_item_data, $product_id, $total_price, $user, $ticket_type_arr, $event_extra);
} else {
return $cart_item_data;
}
}
add_filter('woocommerce_add_cart_item_data', 'mep_add_custom_fields_text_to_cart_item', 90, 3);
@ -106,14 +100,14 @@ function mep_add_custom_price($cart_object)
{
foreach ($cart_object->cart_contents as $key => $value) {
$event_id = array_key_exists('event_id', $value) ? $value['event_id'] : 0;
if (get_post_type($event_id) == 'mep_events') {
$event_total_price = $value['event_tp'];
$value['data']->set_price($event_total_price);
$value['data']->set_regular_price($event_total_price);
$value['data']->set_sale_price($event_total_price);
$value['data']->set_sold_individually('yes');
$value['data']->get_price();
}
if (get_post_type($event_id) == 'mep_events') {
$event_total_price = $value['event_tp'];
$value['data']->set_price($event_total_price);
$value['data']->set_regular_price($event_total_price);
$value['data']->set_sale_price($event_total_price);
$value['data']->set_sold_individually('yes');
$value['data']->get_price();
}
}
}
@ -127,7 +121,7 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
{
$mep_events_extra_prices = array_key_exists('event_extra_option', $cart_item) ? $cart_item['event_extra_option'] : array(); //$cart_item['event_extra_option'];
$eid = array_key_exists('event_id', $cart_item) ? $cart_item['event_id'] : 0; //$cart_item['event_id'];
$eid = array_key_exists('event_id', $cart_item) ? $cart_item['event_id'] : 0; //$cart_item['event_id'];
if (get_post_type($eid) == 'mep_events') {
$hide_location_status = mep_get_option('mep_hide_location_from_order_page', 'general_setting_sec', 'no');
@ -141,94 +135,96 @@ function mep_display_custom_fields_text_cart($item_data, $cart_item)
$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';
$start_time = get_post_meta($eid,'event_start_time',true);
$start_time = get_post_meta($eid, 'event_start_time', true);
echo "<ul class='event-custom-price'>";
if($recurring == 'everyday' && $time_status == 'no'){
if ($recurring == 'everyday' && $time_status == 'no') {
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0 && sizeof($user_info) == 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
if($hide_date_status == 'no'){
?>
<li><?php echo $event_label; _e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'],'date-time-text'); ?></li>
<?php
}
if ($hide_date_status == 'no') {
?>
<li><?php echo $event_label;
_e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'); ?></li>
<?php
}
}
}
if (is_array($user_info) && sizeof($user_info) > 0) {
echo '<li>';
echo mep_cart_display_user_list($user_info,$eid);
echo '</li>';
echo '<li>';
echo mep_cart_display_user_list($user_info, $eid);
echo '</li>';
}
}elseif($recurring == 'everyday' && $time_status == 'yes'){
} elseif ($recurring == 'everyday' && $time_status == 'yes') {
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0 && sizeof($user_info) == 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
if($hide_date_status == 'no'){
if ($hide_date_status == 'no') {
?>
<li><?php echo $event_label; _e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'],'date-time-text'); ?></li>
<?php
}
<li><?php echo $event_label;
_e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'); ?></li>
<?php
}
}
}
if (is_array($user_info) && sizeof($user_info) > 0) {
echo '<li>';
echo mep_cart_display_user_list($user_info,$eid);
echo '</li>';
echo '<li>';
echo mep_cart_display_user_list($user_info, $eid);
echo '</li>';
}
}elseif ($recurring == 'yes') {
} elseif ($recurring == 'yes') {
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0 && sizeof($user_info) == 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
if($hide_date_status == 'no'){
if ($hide_date_status == 'no') {
?>
<li><?php echo $event_label; _e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'],'date-text'); ?></li>
<?php
}
<li><?php echo $event_label;
_e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($_event_recurring_date['event_date'], 'date-text'); ?></li>
<?php
}
}
}
if (is_array($user_info) && sizeof($user_info) > 0) {
echo '<li>';
echo mep_cart_display_user_list($user_info,$eid);
echo '</li>';
echo '<li>';
echo mep_cart_display_user_list($user_info, $eid);
echo '</li>';
}
} else {
if (is_array($user_info) && sizeof($user_info) > 0) {
echo '<li>';
echo mep_cart_display_user_list($user_info, $eid);
echo '</li>';
} else {
if (is_array($user_info) && sizeof($user_info) > 0) {
echo '<li>';
echo mep_cart_display_user_list($user_info,$eid);
echo '</li>';
} else {
if($hide_date_status == 'no'){
?>
<li><?php echo $event_label; _e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($cart_item['event_cart_display_date'],'date-time-text'); ?></li>
if ($hide_date_status == 'no') {
?>
<li><?php echo $event_label;
_e(" Date", 'mage-eventpress'); ?>: <?php echo get_mep_datetime($cart_item['event_cart_display_date'], 'date-time-text'); ?></li>
<?php
}
}
}
}
if($hide_location_status == 'no'){
?>
<li><?php echo $event_label; _e(" Location", 'mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; ?></li>
<?php
}
if ($hide_location_status == 'no') {
?>
<li><?php echo $event_label;
_e(" Location", 'mage-eventpress'); ?>: <?php echo $cart_item['event_cart_location']; ?></li>
<?php
}
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
echo mep_cart_display_ticket_type_list($ticket_type_arr, $eid);
echo mep_cart_display_ticket_type_list($ticket_type_arr, $eid);
}
if (is_array($event_extra_service) && sizeof($event_extra_service) > 0) {
foreach ($event_extra_service as $extra_service) {
echo '<li>' . $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid,$extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ' . wc_price( mep_get_price_including_tax($eid,(float) $extra_service['service_price'] * (float) $extra_service['service_qty'])) . '</li>';
echo '<li>' . $extra_service['service_name'] . " - " . wc_price(mep_get_price_including_tax($eid, $extra_service['service_price'])) . ' x ' . $extra_service['service_qty'] . ' = ' . wc_price(mep_get_price_including_tax($eid, (float) $extra_service['service_price'] * (float) $extra_service['service_qty'])) . '</li>';
}
}
do_action('mep_after_cart_item_display_list',$cart_item);
do_action('mep_after_cart_item_display_list', $cart_item);
echo "</ul>";
}
return $item_data;
@ -246,7 +242,7 @@ function mep_checkout_validation($posted)
$items = $woocommerce->cart->get_cart();
foreach ($items as $item => $values) {
$event_id = array_key_exists('event_id', $values) ? $values['event_id'] : 0; // $values['event_id'];
$check_seat_plan = get_post_meta($event_id,'mepsp_event_seat_plan_info',true) ? get_post_meta($event_id,'mepsp_event_seat_plan_info',true) : array();
$check_seat_plan = get_post_meta($event_id, 'mepsp_event_seat_plan_info', true) ? get_post_meta($event_id, 'mepsp_event_seat_plan_info', true) : array();
if (get_post_type($event_id) == 'mep_events' && sizeof($check_seat_plan) == 0) {
$recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no';
@ -255,24 +251,22 @@ function mep_checkout_validation($posted)
$ticket_arr = $values['event_ticket_info'];
foreach($ticket_arr as $ticket){
foreach ($ticket_arr as $ticket) {
$event_name = get_the_title($event_id);
$type = $ticket['ticket_name'];
$event_date = $ticket['event_date'];
$ticket_qty = $ticket['ticket_qty'];
$event_date_txt = get_mep_datetime($ticket['event_date'],'date-time-text');
$total_sold = mep_ticket_type_sold($event_id,$type,$event_date);
$total_seats_count = apply_filters('mep_event_total_seat_count_checkout', $total_seat, $event_id,$event_date);
$available_seat = (int) $total_seats_count - ((int) $total_resv + (int) $total_sold);
$event_name = get_the_title($event_id);
$type = $ticket['ticket_name'];
$event_date = $ticket['event_date'];
$ticket_qty = $ticket['ticket_qty'];
$event_date_txt = get_mep_datetime($ticket['event_date'], 'date-time-text');
$total_sold = mep_ticket_type_sold($event_id, $type, $event_date);
$total_seats_count = apply_filters('mep_event_total_seat_count_checkout', $total_seat, $event_id, $event_date);
$available_seat = (int) $total_seats_count - ((int) $total_resv + (int) $total_sold);
}
if($ticket_qty > $available_seat){
wc_add_notice("Sorry, $type not availabe. Total available $type is $available_seat of $event_name on $event_date_txt but you select $ticket_qty . Please Try Again", 'error');
}
if ($ticket_qty > $available_seat) {
wc_add_notice("Sorry, $type not availabe. Total available $type is $available_seat of $event_name on $event_date_txt but you select $ticket_qty . Please Try Again", 'error');
}
}
}
}
@ -286,70 +280,89 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
{
$eid = array_key_exists('event_id', $values) ? $values['event_id'] : 0; //$values['event_id'];
$start_time = get_post_meta($eid,'event_start_time',true);
$start_time = get_post_meta($eid, 'event_start_time', true);
$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;
$event_id = $eid;
$mep_events_extra_prices = array_key_exists('event_extra_option', $values) ? $values['event_extra_option'] : [];
$cart_location = array_key_exists('event_cart_location', $values) ? $values['event_cart_location'] : '';
$event_extra_service = array_key_exists('event_extra_service', $values) ? $values['event_extra_service'] : [];
$ticket_type_arr = array_key_exists('event_ticket_info', $values) ? $values['event_ticket_info'] : '';
$cart_date = get_mep_datetime($values['event_cart_date'],'date-time-text');
$cart_date = get_mep_datetime($values['event_cart_date'], 'date-time-text');
$form_position = mep_get_option('mep_user_form_position', 'general_attendee_sec', 'details_page');
$event_user_info = $form_position == 'details_page' ? $values['event_user_info'] : mep_save_attendee_info_into_cart($eid);
$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');
$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 ($recurring == 'everyday' && $time_status == 'no') {
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'].' '.$start_time, 'date-time-text'));
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'] . ' ' . $start_time, 'date-time-text'));
}
}
}elseif ($recurring == 'yes') {
} elseif ($recurring == 'yes') {
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
foreach ($ticket_type_arr as $_event_recurring_date) {
$item->add_meta_data($date_text, get_mep_datetime($_event_recurring_date['event_date'], 'date-time-text'));
}
}
} else {
$item->add_meta_data($date_text,$cart_date);
$item->add_meta_data($date_text, $cart_date);
}
if (is_array($ticket_type_arr) && sizeof($ticket_type_arr) > 0) {
mep_cart_order_data_save_ticket_type($item,$ticket_type_arr,$eid);
mep_cart_order_data_save_ticket_type($item, $ticket_type_arr, $eid);
}
$custom_forms_id = mep_get_user_custom_field_ids($eid);
foreach ($event_user_info as $userinf) {
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){
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]);
}
}
@ -361,8 +374,8 @@ 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'] . ' = ';
$service_type_val = wc_price(mep_get_price_including_tax($eid,(float) $extra_service['service_price'] * (float) $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'] . ' = ';
$service_type_val = wc_price(mep_get_price_including_tax($eid, (float) $extra_service['service_price'] * (float) $extra_service['service_qty']));
$item->add_meta_data($service_type_name, $service_type_val);
}
}
@ -374,7 +387,7 @@ function mep_add_custom_fields_text_to_order_items($item, $cart_item_key, $value
$item->add_meta_data('event_id', $eid);
$item->add_meta_data('_product_id', $eid);
$item->add_meta_data('_event_extra_service', $event_extra_service);
do_action('mep_event_cart_order_data_add',$values,$item);
do_action('mep_event_cart_order_data_add', $values, $item);
}
}
add_action('woocommerce_checkout_create_order_line_item', 'mep_add_custom_fields_text_to_order_items', 90, 4);

File diff suppressed because it is too large Load Diff

View File

@ -163,7 +163,7 @@ function mep_event_list($atts, $content = null)
}
?>
<div class="all_filter_item mep_event_list_sec" id='mep_event_list_<?php echo $unq_id; ?>'>
<div class="all_filter_item mep_event_list_sec" id='mep_event_list_<?php echo esc_attr($unq_id); ?>'>
<?php
$total_item = $loop->post_count;
echo $main_div;

View File

@ -156,44 +156,44 @@ function mep_org_tax_location_fileds($taxonomy)
<?php
}
add_action('created_mep_org', 'save_feature_meta', 10, 2);
add_action('created_mep_org', 'mep_save_feature_meta', 10, 2);
function save_feature_meta($term_id, $tt_id)
function mep_save_feature_meta($term_id, $tt_id)
{
if (isset($_POST['org_location'])) {
$org_location = strip_tags($_POST['org_location']);
$org_location = sanitize_text_field($_POST['org_location']);
add_term_meta($term_id, 'org_location', $org_location);
}
if (isset($_POST['org_street'])) {
$org_street = strip_tags($_POST['org_street']);
$org_street = sanitize_text_field($_POST['org_street']);
add_term_meta($term_id, 'org_street', $org_street);
}
if (isset($_POST['org_city'])) {
$org_city = strip_tags($_POST['org_city']);
$org_city = sanitize_text_field($_POST['org_city']);
add_term_meta($term_id, 'org_city', $org_city);
}
if (isset($_POST['org_state'])) {
$org_state = strip_tags($_POST['org_state']);
$org_state = sanitize_text_field($_POST['org_state']);
add_term_meta($term_id, 'org_state', $org_state);
}
if (isset($_POST['org_postcode'])) {
$org_postcode = strip_tags($_POST['org_postcode']);
$org_postcode = sanitize_text_field($_POST['org_postcode']);
add_term_meta($term_id, 'org_postcode', $org_postcode);
}
if (isset($_POST['org_country'])) {
$org_country = strip_tags($_POST['org_country']);
$org_country = sanitize_text_field($_POST['org_country']);
add_term_meta($term_id, 'org_country', $org_country);
}
if (isset($_POST['latitude'])) {
$latitude = strip_tags($_POST['latitude']);
$latitude = sanitize_text_field($_POST['latitude']);
add_term_meta($term_id, 'latitude', $latitude);
}
if (isset($_POST['longitude'])) {
$longitude = strip_tags($_POST['longitude']);
$longitude = sanitize_text_field($_POST['longitude']);
add_term_meta($term_id, 'longitude', $longitude);
}
}
@ -201,9 +201,9 @@ function save_feature_meta($term_id, $tt_id)
add_action('mep_org_edit_form_fields', 'edit_feature_group_field', 10, 2);
add_action('mep_org_edit_form_fields', 'mep_edit_feature_group_field', 10, 2);
function edit_feature_group_field($term, $taxonomy)
function mep_edit_feature_group_field($term, $taxonomy)
{
?>
<tr class="form-field term-group-wrap">
@ -376,48 +376,48 @@ function edit_feature_group_field($term, $taxonomy)
}
add_action('edited_mep_org', 'update_feature_meta', 10, 2);
add_action('edited_mep_org', 'mep_update_feature_meta', 10, 2);
function update_feature_meta($term_id, $tt_id)
function mep_update_feature_meta($term_id, $tt_id)
{
if (isset($_POST['org_location'])) {
$org_location = strip_tags($_POST['org_location']);
$org_location = sanitize_text_field($_POST['org_location']);
update_term_meta($term_id, 'org_location', $org_location);
}
if (isset($_POST['org_street'])) {
$org_street = strip_tags($_POST['org_street']);
$org_street = sanitize_text_field($_POST['org_street']);
update_term_meta($term_id, 'org_street', $org_street);
}
if (isset($_POST['org_city'])) {
$org_city = strip_tags($_POST['org_city']);
$org_city = sanitize_text_field($_POST['org_city']);
update_term_meta($term_id, 'org_city', $org_city);
}
if (isset($_POST['org_state'])) {
$org_state = strip_tags($_POST['org_state']);
$org_state = sanitize_text_field($_POST['org_state']);
update_term_meta($term_id, 'org_state', $org_state);
}
if (isset($_POST['org_postcode'])) {
$org_postcode = strip_tags($_POST['org_postcode']);
$org_postcode = sanitize_text_field($_POST['org_postcode']);
update_term_meta($term_id, 'org_postcode', $org_postcode);
}
if (isset($_POST['org_country'])) {
$org_country = strip_tags($_POST['org_country']);
$org_country = sanitize_text_field($_POST['org_country']);
update_term_meta($term_id, 'org_country', $org_country);
}
if (isset($_POST['latitude'])) {
$latitude = strip_tags($_POST['latitude']);
$latitude = sanitize_text_field($_POST['latitude']);
update_term_meta($term_id, 'latitude', $latitude);
}
if (isset($_POST['longitude'])) {
$longitude = strip_tags($_POST['longitude']);
$longitude = sanitize_text_field($_POST['longitude']);
update_term_meta($term_id, 'longitude', $longitude);
}
}

View File

@ -65,24 +65,6 @@ add_action('admin_init', 'mep_flash_permalink_once');
add_action('admin_init', 'mep_get_all_order_data_and_create_attendee');
function mep_get_all_order_data_and_create_attendee()
{
if (get_option('mep_hidden_product_thumbnail_update_02') != 'completed') {
$args = array(
@ -99,7 +81,6 @@ function mep_get_all_order_data_and_create_attendee()
update_option('mep_hidden_product_thumbnail_update_02', 'completed');
}
// Event Upcoming Date Upgrade
if (get_option('mep_event_upcoming_date_add_03') != 'completed') {
$args = array(

View File

@ -3,8 +3,6 @@ if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
//Add admin page to the menu
add_action('admin_menu', 'mep_event_status_admin_menu');
function mep_event_status_admin_menu()
@ -76,8 +74,6 @@ $from_email = mep_get_option( 'mep_email_form_email', 'email_setting_sec', '');
<td><?php if($from_email){ echo '<span class="mep_success"> <span class="dashicons dashicons-saved"></span>'.$from_email.'</span>'; }else{ echo '<span class="mep_error"> <span class="dashicons dashicons-no-alt"></span></span>'; } ?></td>
</tr>
<?php }
do_action('mep_event_status_table_item_sec'); ?>
</tbody>
</table>

View File

@ -3,8 +3,6 @@ if (!defined('ABSPATH')) {
die;
} // Cannot access pages directly.
add_action('admin_enqueue_scripts', 'mep_event_welcome_enqueue_scripts', 10, 1);
function mep_event_welcome_enqueue_scripts()
{

View File

@ -1,8 +1,8 @@
=== WooCommerce Event Manager ===
=== Event Manager for WooCommerce ===
Contributors: magepeopleteam, aamahin
Tags: event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events
Requires at least: 5.3
Stable tag: trunk
Stable tag: 3.5.3
Version: 2.1.3
Tested up to: 5.8
WC requires at least: 3.0
@ -11,10 +11,10 @@ Requires PHP: 7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
WooCommerce Event Manager is a Event Plugin for WordPress which is based on WooCommerce.
Event Manager for WooCommerce is a Event Plugin for WordPress which is based on WooCommerce.
== Description ==
WooCommerce Event Manager Plugin- is one of the best and simple event management plugin available in WordPress directory & the best event manager plugin for WordPress. It uses WooCommerce to take payment, which provides freedom for using popular payment getaway via WooCommerce. This plugin supports all WordPress version and can be used to create any types of any types of events.
Event Manager for WooCommerce Plugin- is one of the best and simple event management plugin available in WordPress directory & the best event manager plugin for WordPress. It uses WooCommerce to take payment, which provides freedom for using popular payment getaway via WooCommerce. This plugin supports all WordPress version and can be used to create any types of any types of events.
### Free Version Plugin Features:
@ -43,7 +43,7 @@ WooCommerce Event Manager Plugin- is one of the best and simple event management
➡ Custom Registration Form for Event Attendees.
➡ Automatic Email Conformation Message and Pdf Tickets Mailing Features
➡ Export Attendee List as CSV Format.
➡ [Buy WooCommerce Event Manager Pro](https://mage-people.com/product/mage-woo-event-booking-manager-pro/)
➡ [Buy Event Manager for WooCommerce Pro](https://mage-people.com/product/mage-woo-event-booking-manager-pro/)
### Other Available Addons
@ -62,7 +62,7 @@ WooCommerce Event Manager Plugin- is one of the best and simple event management
➡ [View Live Demo For Indoor Games](https://vaincode.com/event-demo/home-indoor-games/)
👉 [Plugin Documentation](https://docs.mage-people.com/woocommerce-event-manager/)
👉[Buy WooCommerce Event Manager Pro](https://mage-people.com/product/mage-woo-event-booking-manager-pro/) 👈
👉[Buy Event Manager for WooCommerce Pro](https://mage-people.com/product/mage-woo-event-booking-manager-pro/) 👈
@ -263,13 +263,13 @@ Display Event Speaker List Any Post or Page by using the below Shortcode.. examp
👉[Related Event Addon](https://mage-people.com/product/related-events-addon-for-event-manager/)👈
👉[Event Membership Pricing Addon](https://mage-people.com/product/membership-pricing-for-event-manager-plugin/)👈
With this addon, Woocommerce Event manager Plugins Ticket price can set as different member price. Pricing will works depends on member Type login. Currently it is supported with WordPress Default Userrole and WooCommerce Membership Plugin.
With this addon, Event Manager for WooCommerce Plugins Ticket price can set as different member price. Pricing will works depends on member Type login. Currently it is supported with WordPress Default Userrole and WooCommerce Membership Plugin.
👉[Event Max-Min Quantity Limiting Addon](https://mage-people.com/product/event-max-min-quantity-limiting-addon-for-woocommerce-event-manager/)👈
Max Min Quantity Limiting Event function addon for WooCommerce Event Manager, With this addon, admin can enable a events to sell with limiting quantity.
Max Min Quantity Limiting Event function addon for Event Manager for WooCommerce, With this addon, admin can enable a events to sell with limiting quantity.
👉[Event Global Qty Addon](https://mage-people.com/product/global-common-qty-addon-for-event-manager/)👈
With this addon, Woocommerce Event manager Plugins Ticket QTY can manage a Common QTY or Global QTY. Default QTY works with Ticket types QTY but with this addon easily can manage as common quanity.
With this addon, Event Manager for WooCommerce Plugins Ticket QTY can manage a Common QTY or Global QTY. Default QTY works with Ticket types QTY but with this addon easily can manage as common quanity.
👉[Event Review And Rating Addon](https://mage-people.com/product/review-and-rating-addon-for-event-manager/)👈
This is Event rating and review Addon. Admin can enable review and rating section event wise. Admin can setup who can setup review with this addon
@ -278,7 +278,7 @@ Display Event Speaker List Any Post or Page by using the below Shortcode.. examp
This is Event Plugin addon for Seat Plan, With this addon. Anyone can sell ticket with seat plan also. also different type seat plan different pricing possible and very flexible for seat mapping.
👉[Frontend Event Submit Addon](https://mage-people.com/product/event-frontend-submit-addon-for-event-manager/)👈
This is WooCommerce Event Manager Frontend submit addon, With this addon. Organizer can submit Event from my account of organizer page. also organizer can see balance of this event ticket selling, Attendee list also attendee list download also possible by organizer.
This is Event Manager for WooCommerce Frontend submit addon, With this addon. Organizer can submit Event from my account of organizer page. also organizer can see balance of this event ticket selling, Attendee list also attendee list download also possible by organizer.
@ -288,10 +288,10 @@ our support team will back to you shortly.
### How to Install & Create Event 10 minutes using Woocommerce Event Manager Plugin
### How to Install & Create Event 10 minutes using Event Manager for WooCommerce Plugin
https://www.youtube.com/watch?v=zP2ADxzUrYw
### WooCommerce Event Manager Pro Addons Setup And Full Functionality Explained
### Event Manager for WooCommerce Pro Addons Setup And Full Functionality Explained
https://www.youtube.com/watch?v=LZj6oUavTQg
### How to Configure Event Manager Attendee Registration Form
@ -308,7 +308,7 @@ https://www.youtube.com/watch?v=F9wnlUjXa6I
## Privacy Policy
WooCommerce Event Manager uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.
Event Manager for WooCommerce uses [Appsero](https://appsero.com) SDK to collect some telemetry data upon user's confirmation. This helps us to troubleshoot problems faster & make product improvements.
Appsero SDK **does not gather any data by default.** The SDK only starts gathering basic telemetry data **when a user allows it via the admin notice**. We collect the data to ensure a great user experience for all our users.
@ -771,7 +771,7 @@ Style Issue fixed
Bug Fixed
26 Sep 2021*
= 3.5.2=
= 3.5.3=
* Update Release:
Event Search Feature Added
Speed optimization

View File

@ -503,17 +503,17 @@ class MEPEventCountdownWidget extends Widget_Base {
<div id="countdown<?php echo $event_id; ?>" class="mep-event-countdown-timer"></div>
</div>
<script>
jQuery(document).ready(function($) {
jQuery('#countdown<?php echo $event_id; ?>').countdown({
year: <?php echo $year; ?>, // YYYY Format
month: <?php echo $month; ?>, // 1-12
day: <?php echo $day; ?>, // 1-31
hour: <?php echo $hour; ?>, // 24 hour format 0-23
minute: <?php echo $minute; ?>, // 0-59
second: <?php echo $second; ?>, // 0-59
timezone: <?php echo $timezone; ?>, // http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
labels: true, // Show/Hide label elements
});
jQuery(document).ready(function($) {
jQuery('#countdown<?php echo $event_id; ?>').countdown({
year: <?php echo $year; ?>, // YYYY Format
month: <?php echo $month; ?>, // 1-12
day: <?php echo $day; ?>, // 1-31
hour: <?php echo $hour; ?>, // 24 hour format 0-23
minute: <?php echo $minute; ?>, // 0-59
second: <?php echo $second; ?>, // 0-59
timezone: <?php echo $timezone; ?>, // http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
labels: true, // Show/Hide label elements
});
});
</script>
<?php

View File

@ -92,21 +92,20 @@ class MEPEventFaqtWidget extends Widget_Base {
$mep_event_faq = get_post_meta($event_id, 'mep_event_faq', true) ? maybe_unserialize(get_post_meta($event_id, 'mep_event_faq', true)) : '';
?>
<div class="mep-default-title mep-elementor-widget-faq">
<div class="mep-event-faq-part">
<div id='mep-event-accordion' class="">
<?php
foreach ($mep_event_faq as $field) {
?>
<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>
<?php
}
?>
</div>
</div>
<div class="mep-event-faq-part">
<div id='mep-event-accordion' class="">
<?php
foreach ($mep_event_faq as $field) {
?>
<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>
<?php
}
?>
</div>
</div>
</div>
<?php
}
}
}
}

View File

@ -1,28 +1,22 @@
<?php
$day = mep_get_event_upcomming_date($event_id, 'day');
$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');
$day = mep_get_event_upcomming_date($event_id, 'day');
$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 = mep_get_event_upcomming_date($event_id, 'date');
$date = get_post_meta($event_id,'event_upcoming_datetime',true);
$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);
?>
<div class='filter_item mep-event-list-loop <?php echo $columnNumber; ?> mep_event_<?php echo $style; ?>_item mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
style="width:calc(<?php echo $width; ?>% - 14px);"
>
<div class='filter_item mep-event-list-loop <?php echo esc_attr($columnNumber); ?> mep_event_<?php echo esc_attr($style); ?>_item mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>' data-title="<?php echo get_the_title($event_id); ?>" data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>" data-category="<?php echo esc_attr($taxonomy_category); ?>" data-organizer="<?php echo $taxonomy_organizer; ?>" data-date="<?php echo get_mep_datetime($date, 'date'); ?>" style="width:calc(<?php echo $width; ?>% - 14px);">
<?php do_action('mep_event_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">
<a href="<?php echo esc_url(get_the_permalink()); ?>">
<div class="mep_bg_thumb" data-bg-image="<?php mep_get_list_thumbnail_src($event_id,'medium'); ?>" >
<!-- <img data-src="--><?php //mep_get_list_thumbnail_src($event_id); ?><!--" class="lazyload" src="" alt="" />-->
<div class="mep_bg_thumb" data-bg-image="<?php esc_attr(mep_get_list_thumbnail_src($event_id, 'medium')); ?>">
<!-- <img data-src="--><?php //mep_get_list_thumbnail_src($event_id);
?>
<!--" class="lazyload" src="" alt="" />-->
</div>
</a>
<div class="mep-ev-start-date">
@ -35,11 +29,11 @@ $date = get_post_meta($event_id,'event_upcoming_datetime',true);
<span><?php echo mep_get_option('mep_event_multidate_ribon_text', 'label_setting_sec', __('Multi Date Event', 'mage-eventpress')); ?></span>
</div>
<?php } elseif ($recurring != 'no') {
?>
?>
<div class='mep-multidate-ribbon mep-tem3-title-sec'>
<span><?php echo mep_get_option('mep_event_recurring_ribon_text', 'label_setting_sec', __('Recurring Event', 'mage-eventpress')); ?></span>
</div>
<?php
<?php
}
if ($event_type == 'online') { ?>
@ -64,7 +58,7 @@ $date = get_post_meta($event_id,'event_upcoming_datetime',true);
</div>
<?php
if ($style == 'list') {
?>
?>
<div class="mep-event-excerpt">
<?php the_excerpt(); ?>
</div>
@ -75,7 +69,7 @@ $date = get_post_meta($event_id,'event_upcoming_datetime',true);
<?php
if ($hide_org_list == 'no') {
if (sizeof($author_terms) > 0) {
?>
?>
<li class="mep_list_org_name">
<div class="evl-ico"><i class="fa fa-university"></i></div>
<div class="evl-cc">
@ -102,7 +96,7 @@ $date = get_post_meta($event_id,'event_upcoming_datetime',true);
<h6><?php mep_get_event_city($event_id); ?></h6>
</div>
</li>
<?php }
<?php }
}
if ($hide_time_list == 'no' && $recurring == 'no') {
do_action('mep_event_list_date_li', $event_id, 'grid');

View File

@ -8,12 +8,12 @@ $taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
// $date = mep_get_event_upcomming_date($event_id, 'date');
$date = get_post_meta($event_id,'event_upcoming_datetime',true);
?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_minimal_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_minimal_list mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>'
data-title="<?php echo esc_attr(get_the_title($event_id)); ?>"
data-city-name="<?php echo esc_attr(get_post_meta($event_id, 'mep_city', true)); ?>"
data-category="<?php echo esc_attr($taxonomy_category); ?>"
data-organizer="<?php echo esc_attr($taxonomy_organizer); ?>"
data-date="<?php echo esc_attr(get_mep_datetime($date, 'date')); ?>"
>
<?php do_action('mep_event_minimal_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">

View File

@ -6,12 +6,12 @@ $taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
// $date = mep_get_event_upcomming_date($event_id, 'date');
$date = get_post_meta($event_id,'event_upcoming_datetime',true);
?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_native_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_native_list mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>'
data-title="<?php echo esc_attr(get_the_title($event_id)); ?>"
data-city-name="<?php echo esc_attr(get_post_meta($event_id, 'mep_city', true)); ?>"
data-category="<?php echo esc_attr($taxonomy_category); ?>"
data-organizer="<?php echo esc_attr($taxonomy_organizer); ?>"
data-date="<?php echo esc_attr(get_mep_datetime($date, 'date')); ?>"
>
<?php do_action('mep_event_minimal_list_loop_header', $event_id); ?>
<div class="mep_list_thumb">

View File

@ -6,12 +6,12 @@ $taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
// $date = mep_get_event_upcomming_date($event_id, 'date');
$date = get_post_meta($event_id,'event_upcoming_datetime',true);
?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_spring_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_spring_list mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>'
data-title="<?php echo esc_attr(get_the_title($event_id)); ?>"
data-city-name="<?php echo esc_attr(get_post_meta($event_id, 'mep_city', true)); ?>"
data-category="<?php echo esc_attr($taxonomy_category); ?>"
data-organizer="<?php echo esc_attr($taxonomy_organizer); ?>"
data-date="<?php echo esc_attr(get_mep_datetime($date, 'date')); ?>"
>
<?php do_action('mep_event_spring_list_loop_header', $event_id); ?>
<div class="mep_list_date_wrapper">

View File

@ -1 +1 @@
<div class='mep_event_title_list_item mix <?php echo $org_class . ' ' . $cat_class; ?>'><a href='<?php the_permalink(); ?>'><?php the_title(); ?></a></div>
<div class='mep_event_title_list_item mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>'><a href='<?php the_permalink(); ?>'><?php the_title(); ?></a></div>

View File

@ -6,12 +6,12 @@ $taxonomy_organizer = MPWEM_Helper::all_taxonomy_as_text($event_id, 'mep_org');
// $date = mep_get_event_upcomming_date($event_id, 'date');
$date = get_post_meta($event_id,'event_upcoming_datetime',true);
?>
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_winter_list mix <?php echo $org_class . ' ' . $cat_class; ?>'
data-title="<?php echo get_the_title($event_id); ?>"
data-city-name="<?php echo get_post_meta($event_id, 'mep_city', true); ?>"
data-category="<?php echo $taxonomy_category; ?>"
data-organizer="<?php echo $taxonomy_organizer; ?>"
data-date="<?php echo get_mep_datetime($date, 'date'); ?>"
<div class='filter_item mep-event-list-loop mep_event_list_item mep_event_winter_list mix <?php echo esc_attr($org_class) . ' ' . esc_attr($cat_class); ?>'
data-title="<?php echo esc_attr(get_the_title($event_id)); ?>"
data-city-name="<?php echo esc_attr(get_post_meta($event_id, 'mep_city', true)); ?>"
data-category="<?php echo esc_attr($taxonomy_category); ?>"
data-organizer="<?php echo esc_attr($taxonomy_organizer); ?>"
data-date="<?php echo esc_attr(get_mep_datetime($date, 'date')); ?>"
>
<?php do_action('mep_event_winter_list_loop_header', $event_id); ?>
<div class="mep_list_date_wrapper">

View File

@ -32,23 +32,21 @@
<div class="xtra-item-left"><?php echo $ext_left; ?>
<?php echo mep_get_option('mep_left_text', 'label_setting_sec') ? mep_get_option('mep_left_text', 'label_setting_sec') : _e('Left:', 'mage-eventpress'); ?>
</div>
<input type="hidden" name='mep_event_start_date_es[]' value='<?php echo $event_date; ?>'>
<input type="hidden" name='mep_event_start_date_es[]' value='<?php echo esc_attr($event_date); ?>'>
</td>
<td class="mage_text_center">
<?php
if ($ext_left > 0) {
if ($qty_type == 'dropdown') { ?>
<select name="event_extra_service_qty[]" id="eventpxtp_<?php //echo $count;
?>" class='extra-qty-box'>
<select name="event_extra_service_qty[]" id="eventpxtp_" class='extra-qty-box'>
<?php for ($i = 0; $i <= $ext_left; $i++) { ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?> <?php echo $service_name; ?></option>
<option value="<?php echo esc_attr($i); ?>"><?php echo $i; ?> <?php echo $service_name; ?></option>
<?php } ?>
</select>
<?php } else { ?>
<div class="mage_input_group">
<span class="fa fa-minus qty_dec"></span>
<input id="eventpx" <?php //if($ext_left<=0){ echo "disabled"; }
?> size="4" inputmode="numeric" type="text" class='extra-qty-box' name='event_extra_service_qty[]' data-price='<?php echo $data_price; ?>' value='0' min="0" max="<?php echo $ext_left; ?>">
<input id="eventpx" size="4" inputmode="numeric" type="text" class='extra-qty-box' name='event_extra_service_qty[]' data-price='<?php echo esc_attr($data_price); ?>' value='0' min="0" max="<?php echo esc_attr($ext_left); ?>">
<span class="fa fa-plus qty_inc"></span>
</div>
<?php }
@ -59,8 +57,8 @@
<td class="mage_text_center"><?php echo wc_price(mep_get_price_including_tax($post_id, $service_price));
if ($ext_left > 0) { ?>
<p style="display: none;" class="price_jq"><?php echo $tic_price > 0 ? $tic_price : 0; ?></p>
<input type="hidden" name='event_extra_service_name[]' value='<?php echo $service_name; ?>'>
<input type="hidden" name='event_extra_service_price[]' value='<?php echo $service_price; ?>'>
<input type="hidden" name='event_extra_service_name[]' value='<?php echo esc_attr($service_name); ?>'>
<input type="hidden" name='event_extra_service_price[]' value='<?php echo esc_attr($service_price); ?>'>
<?php } ?>
</td>
</tr>

View File

@ -1,4 +1,4 @@
<h3><?php ?><i class="<?php echo $speaker_icon; ?>"></i> <?php echo $speaker_label; ?></h3>
<h3><?php ?><i class="<?php echo esc_attr($speaker_icon); ?>"></i> <?php echo $speaker_label; ?></h3>
<ul>
<?php
foreach ($speakers_id as $speakers) {

View File

@ -12,20 +12,17 @@
<?php echo mep_get_option('mep_ticket_qty_text', 'label_setting_sec') ? mep_get_option('mep_ticket_qty_text', 'label_setting_sec') : _e('Ticket Qty:', 'mage-eventpress'); ?>
</span>
<?php
$tic_price=mep_get_price_including_tax($post_id,$ticket_price);
$actual_price=strip_tags(wc_price(mep_get_price_including_tax($post_id,$ticket_price)));
$data_price=str_replace(get_woocommerce_currency_symbol(), '', $actual_price);
$data_price=str_replace(wc_get_price_thousand_separator(), '', $data_price);
$data_price=str_replace(wc_get_price_decimal_separator(), '.', $data_price);
$tic_price = mep_get_price_including_tax($post_id,$ticket_price);
$actual_price = strip_tags(wc_price(mep_get_price_including_tax($post_id,$ticket_price)));
$data_price = str_replace(get_woocommerce_currency_symbol(), '', $actual_price);
$data_price = str_replace(wc_get_price_thousand_separator(), '', $data_price);
$data_price = str_replace(wc_get_price_decimal_separator(), '.', $data_price);
if ($total_left > 0) {
if ($qty_t_type == 'dropdown') { ?>
<select name="option_qty[]" id="eventpxtp_<?php echo $count; ?>" <?php if ($total_left <= 0) { ?> style='display: none!important;' <?php } ?> class='extra-qty-box etp'>
<select name="option_qty[]" id="eventpxtp_<?php echo esc_attr($count); ?>" <?php if ($total_left <= 0) { ?> style='display: none!important;' <?php } ?> class='extra-qty-box etp'>
<?php
for ($i = $total_min_seat; $i <= $total_left; $i++) { ?>
<option value="<?php echo $i; ?>" <?php if ($i == $default_quantity) {
echo 'Selected';
} ?>><?php echo $i; ?>
<option value="<?php echo esc_attr($i); ?>" <?php if ($i == $default_quantity) { echo 'Selected'; } ?>><?php echo esc_attr($i); ?>
<?php echo mep_get_option('mep_ticket_text', 'label_setting_sec') ? mep_get_option('mep_ticket_text', 'label_setting_sec') : _e('Ticket:', 'mage-eventpress'); ?>
</option>
<?php } ?>
@ -34,13 +31,13 @@
<div class="mage_input_group">
<span class="fa fa-minus qty_dec"></span>
<input id="eventpxtp_<?php echo $count; ?>" type="text" class='extra-qty-box etp' name='option_qty[]' data-price='<?php echo $data_price; ?>' value='<?php echo $default_quantity; ?>' min="<?php echo $total_min_seat; ?>" max="<?php echo max($total_left, 0); ?>">
<input id="eventpxtp_<?php echo esc_attr($count); ?>" type="text" class='extra-qty-box etp' name='option_qty[]' data-price='<?php echo esc_attr($data_price); ?>' value='<?php echo esc_attr($default_quantity); ?>' min="<?php echo esc_attr($total_min_seat); ?>" max="<?php echo esc_attr(max($total_left, 0)); ?>">
<span class="fa fa-plus qty_inc"></span>
</div>
<?php }
} else {
?>
<input id="eventpxtp_<?php echo $count; ?>" type="hidden" class='extra-qty-box etp' name='option_qty[]' data-price='0' value='0' min="0" max="0">
<input id="eventpxtp_<?php echo esc_attr($count); ?>" type="hidden" class='extra-qty-box etp' name='option_qty[]' data-price='0' value='0' min="0" max="0">
<?php echo mep_get_option('mep_no_seat_available_text', 'label_setting_sec') ? mep_get_option('mep_no_seat_available_text', 'label_setting_sec') : _e('No Seat Availables', 'mage-eventpress');
}
$ticket_name = mep_remove_apostopie($field['option_name_t']);
@ -59,12 +56,12 @@
</tr>
<tr>
<td colspan="<?php echo apply_filters('mep_hidden_row_colspan_no',3); ?>" class='user-innnf'>
<input type="hidden" name='mep_event_start_date[]' value="<?php echo $start_date; ?>">
<input type="hidden" name='option_name[]' value='<?php echo mep_remove_apostopie($field['option_name_t']); ?>'>
<input type="hidden" name='option_price[]' value='<?php echo $ticket_price; ?>'>
<input type="hidden" name='max_qty[]' value='<?php if(array_key_exists('option_max_qty',$field)){ echo $field['option_max_qty']; }else{ echo ''; } ?>'>
<input type="hidden" name='mep_event_start_date[]' value="<?php echo esc_attr($start_date); ?>">
<input type="hidden" name='option_name[]' value='<?php echo esc_attr(mep_remove_apostopie($field['option_name_t'])); ?>'>
<input type="hidden" name='option_price[]' value='<?php echo esc_attr($ticket_price); ?>'>
<input type="hidden" name='max_qty[]' value='<?php if(array_key_exists('option_max_qty',$field)){ echo esc_attr($field['option_max_qty']); }else{ echo ''; } ?>'>
<div class="user-info-sec">
<div id="dadainfo_<?php echo $count; ?>" class="dada-info"></div>
<div id="dadainfo_<?php echo esc_attr($count); ?>" class="dada-info"></div>
</div>
</td>
</tr>

View File

@ -107,8 +107,6 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<?php do_action('mep_event_social_share'); ?>
</div>
<?php }
if($speaker_status == 'yes'){ ?>
<div class="mep-default-sidebar-speaker-list">
@ -116,8 +114,6 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
</div>
<?php
}
if ($hide_calendar_details == 'no') { ?>
<div class="mep-default-sidrbar-calender-btn">
<?php do_action('mep_event_add_calender',get_the_id()); ?>

View File

@ -91,13 +91,11 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<i class="far fa-list-alt"></i> <?php do_action('mep_event_organizer'); ?>
</div>
<?php }
if ($hide_schedule_details == 'no') { ?>
<div class="mep-default-sidrbar-events-schedule">
<?php do_action('mep_event_date_default_theme',get_the_id()); ?>
</div>
<?php } ?>
<?php if ($hide_total_seat_details == 'no') { ?>
<div class="mep-default-sidrbar-price-seat">
<div class="df-seat"><?php do_action('mep_event_seat'); ?></div>
@ -110,11 +108,9 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<?php } ?>
</div>
</div>
<div class="mep-default-feature-content">
<?php do_action('mep_event_details'); ?>
</div>
<?php if ($hide_share_details == 'no') { ?>
<div class="mep-default-sidrbar-social">
<?php do_action('mep_event_social_share'); ?>
@ -123,7 +119,5 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<div class="mep-default-feature-faq-sec">
<?php do_action('mep_event_faq',get_the_id()); ?>
</div>
</div>
</div>

View File

@ -31,7 +31,7 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<h3>
<?php echo mep_get_option('mep_event_date_text', 'label_setting_sec') ? mep_get_option('mep_event_date_text', 'label_setting_sec') : _e('Event Date:', 'mage-eventpress'); ?>
</h3>
<?php do_action('mep_event_date_only',get_the_id()); ?>
<?php do_action('mep_event_date_only', get_the_id()); ?>
</div>
</div>
<?php }
@ -42,13 +42,13 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
<h3>
<?php echo mep_get_option('mep_event_time_text', 'label_setting_sec') ? mep_get_option('mep_event_time_text', 'label_setting_sec') : _e('Event Time:', 'mage-eventpress'); ?>
</h3>
<?php do_action('mep_event_time_only',get_the_id()); ?>
<?php do_action('mep_event_time_only', get_the_id()); ?>
</div>
</div>
<?php }
if ($hide_location_details == 'no') { ?>
<div class="mep-default-feature-location">
<div class="df-ico"><i class="fas fa-map-marker-alt"></i></div>
<div class="df-ico"><i class="fas fa-map-marker-alt"></i></div>
<div class='df-dtl'>
<h3>
<?php echo mep_get_option('mep_event_location_text', 'label_setting_sec') ? mep_get_option('mep_event_location_text', 'label_setting_sec') : _e('Event Location:', 'mage-eventpress'); ?>
@ -65,43 +65,43 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
</div>
<?php } ?>
</div>
<div class="mep-default-col-wrapper">
<?php if ($hide_location_details == 'no') { ?>
<div class="mep-default-col-1">
<div class="mep-default-sidrbar-map">
<h3>
<?php echo mep_get_option('mep_event_location_text', 'label_setting_sec') ? mep_get_option('mep_event_location_text', 'label_setting_sec') : _e('Find Location On Google Map:', 'mage-eventpress'); ?>
</h3>
<?php do_action('mep_event_map',get_the_id()); ?>
</div>
<div class="mep-default-col-wrapper">
<?php if ($hide_location_details == 'no') { ?>
<div class="mep-default-col-1">
<div class="mep-default-sidrbar-map">
<h3>
<?php echo mep_get_option('mep_event_location_text', 'label_setting_sec') ? mep_get_option('mep_event_location_text', 'label_setting_sec') : _e('Find Location On Google Map:', 'mage-eventpress'); ?>
</h3>
<?php do_action('mep_event_map', get_the_id()); ?>
</div>
<?php if ($hide_calendar_details == 'no') { ?>
<div class="mep-default-sidrbar-calender-btn">
<?php do_action('mep_event_add_calender',get_the_id()); ?>
<?php if ($hide_calendar_details == 'no') { ?>
<div class="mep-default-sidrbar-calender-btn">
<?php do_action('mep_event_add_calender', get_the_id()); ?>
</div>
<?php } ?>
</div>
<?php } ?>
<?php } ?>
<div class="mep-default-col-2">
<?php if ($hide_org_by_details == 'no') { ?>
<div class="mep-default-sidrbar-meta">
<i class="far fa-list-alt"></i> <?php do_action('mep_event_organizer'); ?>
</div>
<?php }
if ($hide_schedule_details == 'no') { ?>
<div class="mep-default-sidrbar-events-schedule">
<?php do_action('mep_event_date_default_theme', get_the_id()); ?>
</div>
<?php } ?>
<?php if ($hide_total_seat_details == 'no') { ?>
<div class="mep-default-sidrbar-price-seat">
<div class="df-seat"><?php do_action('mep_event_seat'); ?></div>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="mep-default-col-2">
<?php if ($hide_org_by_details == 'no') { ?>
<div class="mep-default-sidrbar-meta">
<i class="far fa-list-alt"></i> <?php do_action('mep_event_organizer'); ?>
</div>
<?php }
if ($hide_schedule_details == 'no') { ?>
<div class="mep-default-sidrbar-events-schedule">
<?php do_action('mep_event_date_default_theme',get_the_id()); ?>
</div>
<?php } ?>
<?php if ($hide_total_seat_details == 'no') { ?>
<div class="mep-default-sidrbar-price-seat">
<div class="df-seat"><?php do_action('mep_event_seat'); ?></div>
</div>
<?php } ?>
</div>
</div>
<div class="mep-default-feature-content">
<?php do_action('mep_event_details'); ?>
</div>
@ -114,9 +114,7 @@ $speaker_status = mep_get_option('mep_enable_speaker_list', 'general
</div>
<?php } ?>
<div class="mep-default-feature-faq-sec">
<?php do_action('mep_event_faq',get_the_id()); ?>
<?php do_action('mep_event_faq', get_the_id()); ?>
</div>
</div>
</div>

View File

@ -13,7 +13,6 @@ $hide_share_details = mep_get_option('mep_event_hide_share_this_details'
$hide_calendar_details = mep_get_option('mep_event_hide_calendar_details', 'general_setting_sec', 'no');
$speaker_status = mep_get_option('mep_enable_speaker_list', 'general_setting_sec', 'no');
?>
<div class="mep-default-theme mep_flex default_theme">
<div class="mep-default-content">
<div class="mep-default-title">

View File

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