Check-in/out times for different accommodations

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Check-in/out times for different accommodations

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #788654
    Chrissy Raudonis
    Participant

    I’m using the plugin to manage a property with several different vacation rentals that all have different check-in/out times. Is there a way to display different times for each accommodation type? If not, how could I hide them both from webpages and e-mails?

    Thank you!

    #790586
    Chrissy Raudonis
    Participant

    This is still an outstanding issue. Please help.

    #790915
    J. Davis
    Keymaster

    Hi Chissy,

    It is possible to set general Check-in and Check-out time for all properties only. So you may hide the time from booking confirmation page adding the code below to functions.php file of your theme:

    add_action( 'wp_head', 'remove_renderCheckInDate_and_renderCheckOutDate' );
    function remove_renderCheckInDate_and_renderCheckOutDate(){
    	remove_action( 'mphb_sc_checkout_form_booking_details', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCheckInDate' ) );
    	remove_action( 'mphb_sc_checkout_form_booking_details', array( '\MPHB\Views\Shortcodes\CheckoutView', 'renderCheckOutDate' ) );
    }
    add_action( 'mphb_sc_checkout_form_booking_details', 'my_renderCheckInDate' );
    function my_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>
    		</p>
    		<?php
    	}
    			
    
    add_action( 'mphb_sc_checkout_form_booking_details', 'my_renderCheckOutDate' );
    function my_renderCheckOutDate($booking){
    		?>
    		<p class="mphb-check-out-date">
    			<span><?php _e( 'Check-out:', 'motopress-hotel-booking' ); ?></span>
    			<time datetime="<?php echo $booking->getCheckOutDate()->format( 'Y-m-d' ); ?>">
    				<strong>
    					<?php echo \MPHB\Utils\DateUtils::formatDateWPFront( $booking->getCheckOutDate() ); ?>
    				</strong>
    			</time>
    		</p>
    		<?php
    	}

    Also you may remove the check in and out time from emails by editing translation of the Hotel Booking plugin.

    best regards,
    J. Davis

    #790927
    Chrissy Raudonis
    Participant

    Worked great! Thank you.

    #1025070
    Jan Morten Tøndel
    Participant

    Where in the php file do you add this?

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