hello i want to get form entry time and date and print it on customer receipt or send it to email
i use this script in function.php theme
add_filter( 'gform_replace_merge_tags', 'djb_gform_replace_merge_tags', 10, 7 );
function djb_gform_replace_merge_tags( $text, $form, $entry, $url_encode, $esc_html, $nl2br, $format ) {
if ( strpos( $text, '{current_hour}' ) !== false ) {
$text = str_replace( '{current_hour}', current_time( 'G' ), $text );
}
if ( strpos( $text, '{current_minute}' ) !== false ) {
$text = str_replace( '{current_minute}', current_time( 'i' ), $text );
}
return $text;
}
this code work well before i update gravityform to 2.5
now the Date work well but it show the time 00:00
seems something is wrong or must change in my code for work with new version
anyone have any idea whats the problem ?
thanks