date issue fixed

This commit is contained in:
magepeopleteam 2020-01-13 06:28:38 +00:00
parent c883a5c039
commit d5e733ff85
3 changed files with 25 additions and 17 deletions

View File

@ -455,3 +455,9 @@ A. you can create support ticket here with problem details with possible screens
==> Date Issue Fixed in Some template and organizer page & PDF Ticket ==> Date Issue Fixed in Some template and organizer page & PDF Ticket
==> Email HTML support issue fixed ==> Email HTML support issue fixed
02 Jan 2020* 02 Jan 2020*
*= 3.0.4 =
* Update Release:
==> Date Issue Fixed
13 Jan 2020*

View File

@ -137,7 +137,7 @@ if($recurring == 'yes'){
}else{ }else{
?> ?>
<li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_datetime,'date-text'); ?> <i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_datetime,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></li> <li><i class="fa fa-calendar"></i> <?php echo get_mep_datetime($start_date,'date-text'); ?> <i class="fa fa-clock-o"></i> <?php echo get_mep_datetime($start_datetime,'time'); ?> - <?php if($start_date != $end_date){ echo get_mep_datetime($end_date,'date-text') .' - '; } echo get_mep_datetime($end_datetime,'time'); ?></li>
<?php <?php
} }
} }
@ -198,7 +198,7 @@ foreach($more_date as $ev_date){
} }
}else{ }else{
?> ?>
<p><?php echo get_mep_datetime($start_datetime,'date-text'); ?></p> <p><?php echo get_mep_datetime($start_date,'date-text'); ?></p>
<?php <?php
} }
} }
@ -237,7 +237,7 @@ function mep_ev_time(){
} }
if($cn == $cnt){ if($cn == $cnt){
?> ?>
<p><?php echo mep_get_only_time($ev_date); ?> </p> <p><?php echo get_mep_datetime($ev_date,'time'); ?> </p>
<?php <?php
$cn++; $cn++;
} }
@ -245,7 +245,7 @@ function mep_ev_time(){
} }
}else{ }else{
?> ?>
<p><?php mep_get_only_time($start_datetime); ?></p> <p><?php echo get_mep_datetime($start_datetime,'time'); ?></p>
<?php <?php
} }

View File

@ -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.3 * Version: 3.0.4
* 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
@ -970,11 +970,13 @@ switch ( $column ) {
// Getting event exprie date & time // Getting event exprie date & time
function mep_get_event_status($startdatetime){ function mep_get_event_status($startdatetime){
$current = current_time('Y-m-d H:i:s');
$time = strtotime($startdatetime);
$newformat = date('Y-m-d H:i:s',$time);
$default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC'; $default_timezone_val = get_option('timezone_string') ? get_option('timezone_string') : 'UTC';
date_default_timezone_set($default_timezone_val); date_default_timezone_set($default_timezone_val);
$current = current_time('Y-m-d H:i:s');
$newformat = date('Y-m-d H:i:s',strtotime($startdatetime));
// date_default_timezone_set(get_option('timezone_string')); // date_default_timezone_set(get_option('timezone_string'));
$datetime1 = new DateTime($newformat); $datetime1 = new DateTime($newformat);
@ -982,7 +984,7 @@ function mep_get_event_status($startdatetime){
$interval = date_diff($datetime2, $datetime1); $interval = date_diff($datetime2, $datetime1);
if(time() > strtotime($newformat)){ if(current_time('Y-m-d H:i:s') > $newformat){
return "<span class=err>Expired</span>"; return "<span class=err>Expired</span>";
} }
else{ else{
@ -2133,8 +2135,8 @@ $wpdatesettings = $date_format.' '.$time_format;
}else{ }else{
return date_i18n( 'd, D M Y', strtotime( $date ) ); return date_i18n( 'd, D M Y', strtotime( $date ) );
} }
//return date_i18n( 'd, D M Y', strtotime( $date ) );
} }
if($type == 'date-time-text'){ if($type == 'date-time-text'){
if($user_set_format == 12){ if($user_set_format == 12){
return date_i18n( 'd, D M Y h:i A', strtotime( $date ) ); return date_i18n( 'd, D M Y h:i A', strtotime( $date ) );
@ -2148,7 +2150,7 @@ $wpdatesettings = $date_format.' '.$time_format;
if($user_set_format == 12){ if($user_set_format == 12){
return date( 'h:i A', strtotime( $date ) ); return date( 'h:i A', strtotime( $date ) );
}elseif($user_set_format == 'wtss'){ }elseif($user_set_format == 'wtss'){
return date_i18n( $time_format, strtotime( $date ) ); return date( $time_format, strtotime( $date ) );
}else{ }else{
return date( 'H:i', strtotime( $date ) ); return date( 'H:i', strtotime( $date ) );
} }
@ -2159,7 +2161,7 @@ $wpdatesettings = $date_format.' '.$time_format;
function on_post_publish( $post_id, $post, $update ) { function mep_on_post_publish( $post_id, $post, $update ) {
if ($post->post_type == 'mep_events' && $post->post_status == 'publish' && empty(get_post_meta( $post_id, 'check_if_run_once' ))) { if ($post->post_type == 'mep_events' && $post->post_status == 'publish' && empty(get_post_meta( $post_id, 'check_if_run_once' ))) {
// print_r($post); // print_r($post);
@ -2187,7 +2189,7 @@ function on_post_publish( $post_id, $post, $update ) {
//die(); //die();
} }
} }
add_action( 'wp_insert_post', 'on_post_publish', 10, 3 ); add_action( 'wp_insert_post', 'mep_on_post_publish', 10, 3 );
function mep_count_hidden_wc_product($event_id){ function mep_count_hidden_wc_product($event_id){
$args = array( $args = array(