Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Check-in range Hours
- This topic has 3 replies, 2 voices, and was last updated 1 year, 10 months ago by
Andre Flores.
- AuthorPosts
- January 21, 2019 at 3:37 pm #763481
fabrizio anichini
ParticipantHi, Int the checkout page the check-in is formated in this way:
Check-in: January 25, 2019, from 11:00 amI want to change for show the details in this way:
Check-in: January 25, 2019,from 15:00 am to 19:30 amIs there any way to do this?
January 25, 2019 at 3:27 pm #765617J. Davis
KeymasterHello Fabrizio,
As there is no option to indicate the time-frame for Check-In you may add this information as text to Booking Confirmation page before [mphb_checkout] shortcode.
or override initial function hardcording with your custom text e.g.:
add_action( 'wp_head', 'remove_my_class_action' ); function remove_my_class_action(){ remove_action( 'mphb_sc_checkout_form_booking_details', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCheckInDate' ) ); } add_action( 'mphb_sc_checkout_form_booking_details', 'renderCheckInDate' ); function renderCheckInDate( $booking ){ ?> <p class="mphb-check-in-date"> <span><?php _e( 'Check-in:', 'motopress-hotel-booking' ); ?></span> <time datetime="<?php echo $booking->getCheckInDate()->format( 'Y-m-d' ); ?>"> <strong> <?php echo \MPHB\Utils\DateUtils::formatDateWPFront( $booking->getCheckInDate() ); ?> </strong> </time>, <span> <?php _ex( 'from', 'from 10:00 am', 'motopress-hotel-booking' ); ?> </span> <time datetime="<?php echo MPHB()->settings()->dateTime()->getCheckInTime(); ?>"> <?php echo MPHB()->settings()->dateTime()->getCheckInTimeWPFormatted() . ' to 19:30'; ?> </time> </p> <?php }
You may adjust time format at WordPress settings.
best regards,
J. DavisJuly 13, 2020 at 8:40 am #978695Michal Popelka
ParticipantHi, where to insert this code? In function.php?
July 14, 2020 at 6:18 am #979081Andre Flores
ModeratorHello, Michal!
If you would like to overwrite the function itself, then yes, the code should be added to your child theme functions.php file.
Regards,
Andre - AuthorPosts
- You must be logged in to reply to this topic.