Created
January 11, 2021 03:17
-
-
Save davidmroth/daf638678326e52508dca75c246a24e7 to your computer and use it in GitHub Desktop.
LEARNDASH EMAIL DATE/TIME FIX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/home/ampcare/htdocs/wp-content/plugins/learndash-notifications/includes/shortcode.php | |
# Line number: 106 | |
if ( ! empty( $timezone_string = get_option( 'timezone_string' ) ) ) { | |
date_default_timezone_set( $timezone_string ); | |
} | |
#$result = date_i18n( $atts['format'], $completed_on ); | |
if ( ! empty( $timezone_string ) ) { | |
$result = new DateTime( "@$completed_on" ); | |
$result = date_timezone_set($result, timezone_open( $timezone_string ) ); | |
$result = $result->format( $atts['format'] ); | |
} | |
else { | |
$result = date_i18n( $atts['format'], $completed_on ); | |
} | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment