public static
|
#
bkap_before_add_to_cart( )
This function will disable the quantity and add to cart button on the frontend
for a bookable product based on the settings for 'Purchase without choosing a
Booking Date'.
This function will disable the quantity and add to cart button on the frontend for a bookable product based on the settings for 'Purchase without choosing a Booking Date'.
Since
1.0
Hook
woocommerce_before_add_to_cart_form
|
public static
|
#
bkap_price_display( )
Adds a span to display the bookable amount on
the Product page
Adds a span to display the bookable amount on
the Product page
Since
2.6.2
Hook
woocommerce_single_variation
woocommerce_before_add_to_cart_button
|
public static
array
|
#
bkap_localize_process_script( integer $post_id, boolean $edit = false )
Localizes and passes data to the JS scripts used on the
front end product page as well as all the other places where
booking fields are available for editing.
Localizes and passes data to the JS scripts used on the
front end product page as well as all the other places where
booking fields are available for editing.
Parameters
- $post_id
- $edit
- True when called from Edit Booking page, else set to false.
Returns
array $hidden_dates_array - Array containing data for the Booking Search Widget
Since
4.1.0
|
public static
string
|
#
set_fixed_block_hidden_date( string $hidden_date, string|integer $product_id, array $holiday_array, array $global_holidays, array $lockout_dates_array )
This function sets the hidden date variable for Fixed block bookings
This function sets the hidden date variable for Fixed block bookings
Parameters
- $hidden_date
- Hidden Date variable previously set
- $product_id
- $holiday_array
- $global_holidays
- $lockout_dates_array
Returns
string $hidden_date - Hidden Date to be set
Since
v4.5.0
|
public static
|
#
bkap_booking_after_add_to_cart( )
This function add the Booking fields on the frontend product page
for bookable products.
This function add the Booking fields on the frontend product page
for bookable products.
Since
1.0
Hook
woocommerce_before_add_to_cart_button
|
public static
|
#
bkap_call_addon_price( )
This function displays the prices calculated for
bookings (Single Day and Date & Time Bookings) on
the front end product page.
This function displays the prices calculated for
bookings (Single Day and Date & Time Bookings) on
the front end product page.
Since
2.0
|
public static
|
#
bkap_js( )
This function adds a hook where addons can execute js code
that maybe needed on the front end product page during booking
price calculation.
This function adds a hook where addons can execute js code
that maybe needed on the front end product page during booking
price calculation.
Since
2.0
|
public static
array
|
#
bkap_get_date_lockout( )
This function returns the availability for a given
date for all types of bookings
Called via AJAX
This function returns the availability for a given
date for all types of bookings
Called via AJAX
Returns
array containing the message and the availability.
Since
2.1
|
public static
string|integer
|
#
bkap_get_date_availability( integer $product_id, integer $variation_id, string $hidden_date, string $check_in_date, array $bookings_placed, array $attr_bookings_placed, string $hidden_checkout_date = '', boolean $cart_check = true, integer $resource_id = 0, array $resource_bookings_placed = '' )
This function calculates and returns the availability for a given
date for all types of bookings
This function calculates and returns the availability for a given
date for all types of bookings
Parameters
- $product_id
- $variation_id
- Variation ID, 0 for simple products.
- $hidden_date
- Booking Start Date in j-n-Y format
- $check_in_date
- Booking Start Date as per set in the booking field
- $bookings_placed
- Number of bookings already present for the product.
- $attr_bookings_placed
- Number of bookings already present for the attribute.
- $hidden_checkout_date
- Booking End date in j-n-Y format. Blanks for single day and date & time bookings
- $cart_check
- True when availability is being checked on the front end. Checks for the product present in the Cart as well.
False when availability is being checked for importing & mapping Google Events.
- $resource_id
- Resource ID, 0 for when no resources are setup.
- $resource_bookings_placed
- Bookings already present for the resource.
Returns
string|integer $available_tickets - Available Bookings. Integer for a finite value and string for unlimited bookings.
Since
2.1
|
public static
array
|
#
bkap_get_time_lockout( )
This function returns the availability for a given
timeslot for all types of bookings.
Called via AJAX
This function returns the availability for a given
timeslot for all types of bookings.
Called via AJAX
Returns
array containing the message and the availability.
Since
2.1
|
public static
string|integer
|
#
bkap_get_time_availability( integer $product_id, string $booking_date, string $from_hrs, string $to_hrs, string $check_availability )
This function calculates and returns the availability for a given
timslot for all types of bookings
This function calculates and returns the availability for a given
timslot for all types of bookings
Parameters
- $product_id
- $booking_date
- Booking Start Date in j-n-Y format
- $from_hrs
- Time Slot Start Hours (G:i)
- $to_hrs
- Time Slot End Hours (G:i)
- $check_availability
- YES when availability is to be calculated at Product level
NO when availability is to be calculated at variation/attribute/resource level.
Returns
string|integer $available_tickets - Available Bookings. Integer for a finite value and string for unlimited bookings.
Since
2.1
|
public static
|
#
bkap_purchase_wo_date_price( )
Sets up and displays the product price
Sets up and displays the product price
This function setups the bookable price in the hidden fields
& displays the price for single day and/or time bookings when
the purchase without date setting is on and the product is being
purchased without a date.
Called via AJAX
Since
2.8.1
|
public static
string
|
#
bkap_get_fixed_block_inline_date( )
Returns the checkout date for Multiple Day bookings that
use Fixed Blocks along with Inline Calendar.
Returns the checkout date for Multiple Day bookings that
use Fixed Blocks along with Inline Calendar.
This function is called on product page load.
Called via AJAX
Returns
string $date_final_checkout - Y-m-d - Checkout date.
Since
2.5.4
|
public static
|
#
bkap_get_per_night_price( )
This function displays the price calculated on the frontend
product page for Multiple day booking feature.
Called via AJAX
This function displays the price calculated on the frontend
product page for Multiple day booking feature.
Called via AJAX
Since
1.1
|
public static
|
#
bkap_insert_date( )
This function adds the booking date selected on the frontend
product page in the Booking History table for only day bookings
using Weekdays when the date is selected.
This function adds the booking date selected on the frontend
product page in the Booking History table for only day bookings
using Weekdays when the date is selected.
Called via AJAX
Since
1.0
|
public static
|
#
bkap_check_for_time_slot( )
This function displays the timeslots for the selected
date for Date & Time Bookable products.
This function displays the timeslots for the selected
date for Date & Time Bookable products.
Called via AJAX
Since
1.0
|
public static
string
|
#
get_time_slot( string $current_date, string|integer $post_id )
This function returns the time slots available for booking
for a Date & Time bookable product as a string.
This function returns the time slots available for booking
for a Date & Time bookable product as a string.
Parameters
- $current_date
- Date for which booking is being placed.
- $post_id
Returns
string $drop_down - Time Slots string where | is the separator
Since
2.0
|
public static
|
#
bkap_prepopulate_fixed_block( string|integer $duplicate_of )
Pre select the fixed block
Pre select the fixed block
This function is called only when fixed blocks are enabled and
a search is performed in the search widget. It pre populates the correct block
based on the date selected.
Parameters
Since
2.9
|
public static
str
|
#
bkap_first_available( integer $duplicate_of, array $lockout_dates_array, str $date )
Return the first available date from the given product.
Return the first available date from the given product.
This function returns the first available booking date
for the given product
Parameters
- $duplicate_of
- $lockout_dates_array
- array containing locked dates
- $date
- j-n-Y format
Returns
str $date j-n-Y format
Since
3.0
|
public static
array
|
#
bkap_first_available_date_fixed_block( array $bkap_fixed_blocks_data, integer $min_day )
Return the specific date array excluding product holidays
Return the specific date array excluding product holidays
This function returns the specific date array which will not have any holiday dates
Parameters
- $bkap_fixed_blocks_data
- array contains fixed blocks data
- $min_day
Returns
array $bkap_fixed_blocks_data array contains fixed block based on first available date
Since
4.1.3
|
public static
array
|
#
bkap_check_specificdate_in_holiday( array $specific_date, array $holiday_array )
Return the specific date array excluding product holidays
Return the specific date array excluding product holidays
This function returns the specific date array which will not have any holiday dates
Parameters
- $specific_date
- array containing specific dates
- $holiday_array
- array containing product level holidays
Returns
array $specific_date
Since
4.1.3
|
public static
array
|
#
bkap_check_specificdate_in_global_holiday( array $specific_date, array $global_holidays )
Return the specific date array excluding global holidays
Return the specific date array excluding global holidays
This function returns the specific date array which will not have any holiday dates added at global level
Parameters
- $specific_date
- array containing specific dates
- $global_holidays
- array containing global level holidays
Returns
array $specific_date
Since
4.1.3
|
public static
string
|
#
bkap_first_available_resource_date( integer $product_id, string $default_date )
Return the first available date for first resource.
Return the first available date for first resource.
Parameters
- $product_id
- $default_date
Returns
string $default_date - Date in j-n-Y formt
Since
4.8.0
|
public static
str
|
#
bkap_add_unlimited_slots( str $dropdown )
Add any unlimited booking slots that might be present
for the date/day to be displayed for the date/day
along with any timeslots that might have a finite
availability.
Add any unlimited booking slots that might be present
for the date/day to be displayed for the date/day
along with any timeslots that might have a finite
availability.
Parameters
- $dropdown
- String containing timeslots with a finite availability
Returns
str $display - String containing timeslots with a finite availability as well as those with unlimited availability.
Since
4.4.0
Hook
bkap_edit_display_timeslots
|