Check-in range Hours

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #763481
    fabrizio anichini

    Hi, Int the checkout page the check-in is formated in this way:
    Check-in: January 25, 2019, from 11:00 am

    I want to change for show the details in this way:
    Check-in: January 25, 2019,from 15:00 am to 19:30 am

    Is there any way to do this?

    J. Davis

    Hello 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' ); ?>">
    					<?php echo \MPHB\Utils\DateUtils::formatDateWPFront( $booking->getCheckInDate() ); ?>
    				<?php _ex( 'from', 'from 10:00 am', 'motopress-hotel-booking' ); ?>
    			<time datetime="<?php echo MPHB()->settings()->dateTime()->getCheckInTime(); ?>">
    				<?php echo MPHB()->settings()->dateTime()->getCheckInTimeWPFormatted() . ' to 19:30'; ?>

    You may adjust time format at WordPress settings.

    best regards,
    J. Davis

    Michal Popelka

    Hi, where to insert this code? In function.php?

    Andre Flores

    Hello, Michal!

    If you would like to overwrite the function itself, then yes, the code should be added to your child theme functions.php file.


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.