code improved and version 3.0.5
This commit is contained in:
parent
d5e733ff85
commit
759f59c90e
|
@ -143,14 +143,14 @@ class MAGE_Events_Setting_Controls {
|
|||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'mep_event_expire_on_datetime',
|
||||
'name' => 'mep_event_expire_on_datetimes',
|
||||
'label' => __( 'When will event expire', 'mage-eventpress' ),
|
||||
'desc' => __( 'Please select when event will expire, On event start time or event endtime', 'mage-eventpress' ),
|
||||
'type' => 'select',
|
||||
'default' => 'mep_event_start_date',
|
||||
'options' => array(
|
||||
'event_start_date' => 'Event Start Time',
|
||||
'event_end_date' => 'Event End Time'
|
||||
'event_start_datetime' => 'Event Start Time',
|
||||
'event_end_datetime' => 'Event End Time'
|
||||
)
|
||||
),
|
||||
|
||||
|
|
|
@ -1417,7 +1417,7 @@ $event_start_time = strip_tags($_POST['event_start_time']);
|
|||
$event_end_date = strip_tags($_POST['event_end_date']);
|
||||
$event_end_time = strip_tags($_POST['event_end_time']);
|
||||
// $mep_event_end_date = strip_tags($_POST['mep_event_end_date']);
|
||||
$mep_event_cc_email_text = strip_tags($_POST['mep_event_cc_email_text']);
|
||||
$mep_event_cc_email_text = $_POST['mep_event_cc_email_text'];
|
||||
|
||||
|
||||
$latitude = isset($_POST['latitude']) ? strip_tags($_POST['latitude']) : "";
|
||||
|
@ -1454,13 +1454,16 @@ $mep_reg_tshirtsize_list = update_post_meta( $pid, 'mep_reg_tshirtsize_list
|
|||
$update_template = update_post_meta( $pid, 'mep_event_template', $mep_event_template);
|
||||
$update_mep_org_address = update_post_meta( $pid, 'mep_org_address', $mep_org_address);
|
||||
|
||||
|
||||
$event_start_datetime = date('Y-m-d H:i:s',strtotime($event_start_date.' '.$event_start_time));
|
||||
$event_end_datetime = date('Y-m-d H:i:s',strtotime($event_end_date.' '.$event_end_time));
|
||||
|
||||
update_post_meta( $pid, 'event_start_date', $event_start_date);
|
||||
update_post_meta( $pid, 'event_start_time', $event_start_time);
|
||||
update_post_meta( $pid, 'event_end_date', $event_end_date);
|
||||
update_post_meta( $pid, 'event_end_time', $event_end_time);
|
||||
|
||||
update_post_meta( $post_id, 'event_start_datetime', $event_start_datetime );
|
||||
update_post_meta( $post_id, 'event_end_datetime', $event_end_datetime );
|
||||
|
||||
$mep_event_ticket_type = get_post_meta($pid, 'mep_event_ticket_type', true);
|
||||
|
||||
|
|
|
@ -267,9 +267,30 @@ if(isset($values['event_ticket_qty'])){
|
|||
}else{
|
||||
$event_ticket_qty = " ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$user_set_format = mep_get_option( 'mep_event_time_format','general_setting_sec',12);
|
||||
$date_format = get_option( 'date_format' );
|
||||
$time_format = get_option( 'time_format' );
|
||||
$wpdatesettings = $date_format.' '.$time_format;
|
||||
|
||||
if($user_set_format == 12){
|
||||
$cart_date = date_i18n( 'Y-m-d h:i A', strtotime( $values['event_cart_date'] ) );
|
||||
}elseif($user_set_format == 24){
|
||||
$cart_date = date_i18n( 'Y-m-d H:i', strtotime( $values['event_cart_date'] ) );
|
||||
}elseif($user_set_format == 'wtss'){
|
||||
$cart_date = date_i18n( $wpdatesettings, strtotime( $values['event_cart_date'] ) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$product_id = $values['product_id'];
|
||||
$cart_location = $values['event_cart_location'];
|
||||
$cart_date = $values['event_cart_date'];
|
||||
|
||||
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
|
||||
|
||||
if($form_position=='details_page'){
|
||||
|
@ -281,7 +302,7 @@ $form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec
|
|||
|
||||
|
||||
|
||||
|
||||
$item->add_meta_data('Date',$cart_date);
|
||||
|
||||
$item->add_meta_data('Location',$cart_location);
|
||||
$item->add_meta_data('_event_ticket_info',$values['event_ticket_info']);
|
||||
|
|
|
@ -101,7 +101,7 @@ function mep_event_list($atts, $content=null){
|
|||
$pagination = $params['pagination'];
|
||||
$sort = $params['sort'];
|
||||
$column = $params['column'];
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetime', 'general_setting_sec', 'event_start_date');
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
ob_start();
|
||||
?>
|
||||
<div class='mep_event_list'>
|
||||
|
@ -229,7 +229,7 @@ elseif($org>0){
|
|||
while ($loop->have_posts()) {
|
||||
$loop->the_post();
|
||||
$event_meta = get_post_custom(get_the_id());
|
||||
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||
$author_terms = get_the_terms(get_the_id(), 'mep_org');
|
||||
$time = strtotime($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
|
||||
$newformat = date_i18n('Y-m-d H:i:s',$time);
|
||||
|
||||
|
|
|
@ -48,6 +48,34 @@ 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_event_default_date_update_2020' ) != 'completed' ) {
|
||||
|
||||
$args = array(
|
||||
'post_type' => 'mep_events',
|
||||
'posts_per_page' => -1
|
||||
);
|
||||
|
||||
$qr = new WP_Query($args);
|
||||
foreach($qr->posts as $result){
|
||||
$post_id = $result->ID;
|
||||
$mep_start_date = get_post_meta($post_id, 'event_start_date', true);
|
||||
$mep_start_time = get_post_meta($post_id, 'event_start_time', true);
|
||||
$mep_end_date = get_post_meta($post_id, 'event_end_date', true);
|
||||
$mep_end_time = get_post_meta($post_id, 'event_end_time', true);
|
||||
|
||||
$event_start_datetime = date('Y-m-d H:i:s',strtotime($mep_start_date.' '.$mep_start_time));
|
||||
$event_end_datetime = date('Y-m-d H:i:s',strtotime($mep_end_date.' '.$mep_end_time));
|
||||
|
||||
update_post_meta( $post_id, 'event_start_datetime', $event_start_datetime );
|
||||
update_post_meta( $post_id, 'event_end_datetime', $event_end_datetime );
|
||||
}
|
||||
update_option( 'mep_event_default_date_update_2020', 'completed' );
|
||||
//die();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ( get_option( 'mep_event_default_date_update_20' ) != 'completed' ) {
|
||||
|
||||
$args = array(
|
||||
|
|
|
@ -457,7 +457,9 @@ A. you can create support ticket here with problem details with possible screens
|
|||
02 Jan 2020*
|
||||
|
||||
|
||||
*= 3.0.4 =
|
||||
*= 3.0.5 =
|
||||
* Update Release:
|
||||
==> Date Issue Fixed
|
||||
13 Jan 2020*
|
||||
==> Code Improved
|
||||
==> Date Issue Fixed in Event List
|
||||
==> Email HTML support issue fixed
|
||||
15 Jan 2020*
|
|
@ -30,6 +30,8 @@ $currency_pos = get_option( 'woocommerce_currency_pos' );
|
|||
?>
|
||||
|
||||
<div class="mep-events-wrapper">
|
||||
<div class="sharethis-inline-share-buttons"></div>
|
||||
<br>
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . "/themes/$_current_template"); ?>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,8 @@ function mep_get_event_reg_btn(){
|
|||
global $post,$event_meta;
|
||||
$post_id = $post->ID;
|
||||
$event_meta = get_post_custom($post_id);
|
||||
$event_expire_date = $event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0];
|
||||
$event_expire_on = mep_get_option( 'mep_event_expire_on_datetimes', 'general_setting_sec', 'event_start_datetime');
|
||||
$event_expire_date = $event_meta[$event_expire_on][0];
|
||||
$event_sqi = $event_meta['mep_sqi'][0];
|
||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][0]);
|
||||
|
@ -93,7 +94,7 @@ $interval = date_diff($datetime2, $datetime1);
|
|||
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||
?>
|
||||
<span class=event-expire-btn>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Event Expired','mage-eventpress'); ?>
|
||||
<?php echo mep_get_option('mep_event_expired_text', 'label_setting_sec') ? mep_get_option('mep_event_expired_text', 'label_setting_sec') : _e('Sorry, Event Expired','mage-eventpress'); ?>
|
||||
</span>
|
||||
<?php
|
||||
} elseif($seat_left<=0){
|
||||
|
|
|
@ -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.0.4
|
||||
* Version: 3.0.5
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
|
@ -294,7 +294,7 @@ $site_name = get_option( 'blogname' );
|
|||
$headers[] = "From: $form_name <$form_email>";
|
||||
|
||||
if($email_body){
|
||||
$sent = wp_mail( $sent_email, $email_sub, $email_body, $headers );
|
||||
$sent = wp_mail( $sent_email, $email_sub, nl2br($email_body), $headers );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue