Created
August 20, 2019 14:26
-
-
Save bogordesaincom/74262a2800094ce6d4d9f3708d2a1407 to your computer and use it in GitHub Desktop.
Honda Booking Sample
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
<?php | |
add_action('frm_display_form_action', 'close_my_form', 8, 3); | |
function close_my_form($params, $fields, $form){ | |
remove_filter('frm_continue_to_new', '__return_false', 50); | |
if($form->id == 7){ //remove this section or change 6 to a form ID | |
// $today = date("now"); // 17:16:18 | |
// $now = strtotime("now") | |
// $today = date('d/m/Y'); | |
// $curtime = time($today '13:00:00'); | |
$today = date('d/m/Y'); | |
$time = '22:00'; // timestamp from RFC 2822 | |
// $workda = $today $curtime; | |
if(time() > strtotime('Y-m-d 13:00')){ | |
echo '<p>Anda telah melewati batas waktu untuk melakukan Booking Service. Jadwal Booking Service Buka Setiap Hari Dari Pukul 07:00 - 13.30</p>'; | |
add_filter('frm_continue_to_new', '__return_false', 50); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment