Skip to content

Instantly share code, notes, and snippets.

@kartikparmar
Created June 6, 2020 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kartikparmar/26f66dab2d84e1fd0652c98f790b9242 to your computer and use it in GitHub Desktop.
Save kartikparmar/26f66dab2d84e1fd0652c98f790b9242 to your computer and use it in GitHub Desktop.
Change Date Comparison for Advance Booking Period. Using this filter you can prepare date based on to time of the booking.
<?php
/**
* Change Date Comparison for Advance Booking Period.
* Using this filter you can prepare date based on to time of the booking.
*
* @param string $time Date and Time String
* @param string $date Date
* @param string $from From Time
* @param string $to To Time
* @param string $product_id Product ID
* @param string $booking_settings Booking Settings
*/
function bkap_change_date_comparison_for_abp_callback( $time, $date, $from, $to, $product_id, $booking_settings ) {
return $date . ' ' . $to;
}
add_filter( 'bkap_change_date_comparison_for_abp', 'bkap_change_date_comparison_for_abp_callback', 10, 6 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment