Check-in range Hours

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by   J. Davis 2 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #763481

    fabrizio anichini
    Participant

    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?

    #765617

    J. Davis
    Keymaster

    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' ); ?>">
    				<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. Davis

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.