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(
|
array(
|
||||||
'name' => 'mep_event_expire_on_datetime',
|
'name' => 'mep_event_expire_on_datetimes',
|
||||||
'label' => __( 'When will event expire', 'mage-eventpress' ),
|
'label' => __( 'When will event expire', 'mage-eventpress' ),
|
||||||
'desc' => __( 'Please select when event will expire, On event start time or event endtime', 'mage-eventpress' ),
|
'desc' => __( 'Please select when event will expire, On event start time or event endtime', 'mage-eventpress' ),
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
'default' => 'mep_event_start_date',
|
'default' => 'mep_event_start_date',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'event_start_date' => 'Event Start Time',
|
'event_start_datetime' => 'Event Start Time',
|
||||||
'event_end_date' => 'Event End Time'
|
'event_end_datetime' => 'Event End Time'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
|
@ -1416,8 +1416,8 @@ $event_start_date = strip_tags($_POST['event_start_date']);
|
||||||
$event_start_time = strip_tags($_POST['event_start_time']);
|
$event_start_time = strip_tags($_POST['event_start_time']);
|
||||||
$event_end_date = strip_tags($_POST['event_end_date']);
|
$event_end_date = strip_tags($_POST['event_end_date']);
|
||||||
$event_end_time = strip_tags($_POST['event_end_time']);
|
$event_end_time = strip_tags($_POST['event_end_time']);
|
||||||
// $mep_event_end_date = strip_tags($_POST['mep_event_end_date']);
|
// $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']) : "";
|
$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_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);
|
$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_date', $event_start_date);
|
||||||
update_post_meta( $pid, 'event_start_time', $event_start_time);
|
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_date', $event_end_date);
|
||||||
update_post_meta( $pid, 'event_end_time', $event_end_time);
|
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);
|
$mep_event_ticket_type = get_post_meta($pid, 'mep_event_ticket_type', true);
|
||||||
|
|
||||||
|
|
|
@ -267,9 +267,30 @@ if(isset($values['event_ticket_qty'])){
|
||||||
}else{
|
}else{
|
||||||
$event_ticket_qty = " ";
|
$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'];
|
$product_id = $values['product_id'];
|
||||||
$cart_location = $values['event_cart_location'];
|
$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' );
|
$form_position = mep_get_option( 'mep_user_form_position', 'general_attendee_sec', 'details_page' );
|
||||||
|
|
||||||
if($form_position=='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('Location',$cart_location);
|
||||||
$item->add_meta_data('_event_ticket_info',$values['event_ticket_info']);
|
$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'];
|
$pagination = $params['pagination'];
|
||||||
$sort = $params['sort'];
|
$sort = $params['sort'];
|
||||||
$column = $params['column'];
|
$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();
|
ob_start();
|
||||||
?>
|
?>
|
||||||
<div class='mep_event_list'>
|
<div class='mep_event_list'>
|
||||||
|
@ -145,7 +145,7 @@ foreach ($terms as $_terms) {
|
||||||
|
|
||||||
<div class="mep_event_list_sec">
|
<div class="mep_event_list_sec">
|
||||||
<?php
|
<?php
|
||||||
$now = current_time('Y-m-d H:i:s');
|
$now = current_time('Y-m-d H:i:s');
|
||||||
$show_price = mep_get_option( 'mep_event_price_show', 'general_setting_sec', 'yes');
|
$show_price = mep_get_option( 'mep_event_price_show', 'general_setting_sec', 'yes');
|
||||||
$show_price_label = mep_get_option( 'event-price-label', 'general_setting_sec', 'Price Starts from:');
|
$show_price_label = mep_get_option( 'event-price-label', 'general_setting_sec', 'Price Starts from:');
|
||||||
$paged = get_query_var("paged")?get_query_var("paged"):1;
|
$paged = get_query_var("paged")?get_query_var("paged"):1;
|
||||||
|
@ -159,7 +159,7 @@ $paged = get_query_var("paged")?get_query_var("paged"):1;
|
||||||
if($cat>0){
|
if($cat>0){
|
||||||
$args_search_qqq = array (
|
$args_search_qqq = array (
|
||||||
'post_type' => array( 'mep_events' ),
|
'post_type' => array( 'mep_events' ),
|
||||||
'paged' => $paged,
|
'paged' => $paged,
|
||||||
'posts_per_page' => $show,
|
'posts_per_page' => $show,
|
||||||
'order' => $sort,
|
'order' => $sort,
|
||||||
'orderby' => 'meta_value',
|
'orderby' => 'meta_value',
|
||||||
|
@ -183,8 +183,8 @@ if($cat>0){
|
||||||
}
|
}
|
||||||
elseif($org>0){
|
elseif($org>0){
|
||||||
$args_search_qqq = array (
|
$args_search_qqq = array (
|
||||||
'post_type' => array( 'mep_events' ),
|
'post_type' => array( 'mep_events' ),
|
||||||
'posts_per_page' => $show,
|
'posts_per_page' => $show,
|
||||||
'paged' => $paged,
|
'paged' => $paged,
|
||||||
'order' => $sort,
|
'order' => $sort,
|
||||||
'orderby' => 'meta_value',
|
'orderby' => 'meta_value',
|
||||||
|
@ -229,7 +229,7 @@ elseif($org>0){
|
||||||
while ($loop->have_posts()) {
|
while ($loop->have_posts()) {
|
||||||
$loop->the_post();
|
$loop->the_post();
|
||||||
$event_meta = get_post_custom(get_the_id());
|
$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]);
|
$time = strtotime($event_meta['event_start_date'][0].' '.$event_meta['event_start_time'][0]);
|
||||||
$newformat = date_i18n('Y-m-d H:i:s',$time);
|
$newformat = date_i18n('Y-m-d H:i:s',$time);
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ if($style == 'grid'){
|
||||||
$columnNumber = 'two_column';
|
$columnNumber = 'two_column';
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$columnNumber = 'one_column';
|
$columnNumber = 'one_column';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -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(){
|
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' ) {
|
if ( get_option( 'mep_event_default_date_update_20' ) != 'completed' ) {
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
|
@ -61,10 +89,10 @@ if ( get_option( 'mep_event_default_date_update_20' ) != 'completed' ) {
|
||||||
$mep_start_date = get_post_meta($post_id, 'mep_event_start_date', true);
|
$mep_start_date = get_post_meta($post_id, 'mep_event_start_date', true);
|
||||||
$mep_end_date = get_post_meta($post_id, 'mep_event_end_date', true);
|
$mep_end_date = get_post_meta($post_id, 'mep_event_end_date', true);
|
||||||
|
|
||||||
$event_start_date = date('Y-m-d',strtotime($mep_start_date));
|
$event_start_date = date('Y-m-d',strtotime($mep_start_date));
|
||||||
$event_start_time = date('H:i',strtotime($mep_start_date));
|
$event_start_time = date('H:i',strtotime($mep_start_date));
|
||||||
$event_end_date = date('Y-m-d',strtotime($mep_end_date));
|
$event_end_date = date('Y-m-d',strtotime($mep_end_date));
|
||||||
$event_end_time = date('H:i',strtotime($mep_end_date));
|
$event_end_time = date('H:i',strtotime($mep_end_date));
|
||||||
|
|
||||||
update_post_meta( $post_id, 'event_start_date', $event_start_date );
|
update_post_meta( $post_id, 'event_start_date', $event_start_date );
|
||||||
update_post_meta( $post_id, 'event_start_time', $event_start_time );
|
update_post_meta( $post_id, 'event_start_time', $event_start_time );
|
||||||
|
|
|
@ -457,7 +457,9 @@ A. you can create support ticket here with problem details with possible screens
|
||||||
02 Jan 2020*
|
02 Jan 2020*
|
||||||
|
|
||||||
|
|
||||||
*= 3.0.4 =
|
*= 3.0.5 =
|
||||||
* Update Release:
|
* Update Release:
|
||||||
==> Date Issue Fixed
|
==> Code Improved
|
||||||
13 Jan 2020*
|
==> 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="mep-events-wrapper">
|
||||||
|
<div class="sharethis-inline-share-buttons"></div>
|
||||||
|
<br>
|
||||||
<?php
|
<?php
|
||||||
require_once(dirname(__FILE__) . "/themes/$_current_template"); ?>
|
require_once(dirname(__FILE__) . "/themes/$_current_template"); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,7 +6,8 @@ function mep_get_event_reg_btn(){
|
||||||
global $post,$event_meta;
|
global $post,$event_meta;
|
||||||
$post_id = $post->ID;
|
$post_id = $post->ID;
|
||||||
$event_meta = get_post_custom($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];
|
$event_sqi = $event_meta['mep_sqi'][0];
|
||||||
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
$mep_full_name = strip_tags($event_meta['mep_full_name'][0]);
|
||||||
$mep_reg_email = strip_tags($event_meta['mep_reg_email'][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)){
|
if(strtotime(current_time('Y-m-d H:i:s')) > strtotime($newformat)){
|
||||||
?>
|
?>
|
||||||
<span class=event-expire-btn>
|
<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>
|
</span>
|
||||||
<?php
|
<?php
|
||||||
} elseif($seat_left<=0){
|
} elseif($seat_left<=0){
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Plugin Name: Woocommerce Events Manager
|
* Plugin Name: Woocommerce Events Manager
|
||||||
* Plugin URI: http://mage-people.com
|
* Plugin URI: http://mage-people.com
|
||||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||||
* Version: 3.0.4
|
* Version: 3.0.5
|
||||||
* Author: MagePeople Team
|
* Author: MagePeople Team
|
||||||
* Author URI: http://www.mage-people.com/
|
* Author URI: http://www.mage-people.com/
|
||||||
* Text Domain: mage-eventpress
|
* Text Domain: mage-eventpress
|
||||||
|
@ -294,7 +294,7 @@ $site_name = get_option( 'blogname' );
|
||||||
$headers[] = "From: $form_name <$form_email>";
|
$headers[] = "From: $form_name <$form_email>";
|
||||||
|
|
||||||
if($email_body){
|
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