Package BKAP\Functions
Functions summary
bkap_400_create_meta | For each product, it copies the serialized data to individual post meta record for easier access |
bkap_400_recurring_data | Adds recurring weekday records & maximum nights for multiple day booking products. |
bkap_400_update_db_tab | Database update tab. Displayed only when automatic update fails. |
bkap_400_update_enable_specific | Enables specific date booking if it is off This is needed if the product uses custom ranges or holidays |
bkap_400_update_enable_week_blocking | Update function added for POS Addon compatibility. |
bkap_400_update_holidays | Up to v3.5.x holidays were saved as a string. From v4.0.0, they will be saved as an array where the date is the key and the number of years to recur is the value. |
bkap_400_update_ranges | Upto v3.5.x the plugin allowed only a single fixed range From v4.0.0 the plugin will allow multiple ranges. Hence this function modifies the way the data is stored. lockout value will be stored as the array value. |
bkap_400_update_recurring_lockout | Adds recurring weekday lockout records for only day and date & time bookings. |
bkap_400_update_settings | Will be run once on updating to version 4.0.0 or higher |
bkap_400_update_special | We're moving the booking_special_price post meta record to _bkap_special_price from 4.0.0 |
bkap_400_update_specific | Upto v3.5.x specific dates were stored as array values. From v4.0.0 the date will be the key in the array and the lockout value will be stored as the array value. |
bkap_410_create_meta | For each product, it copies the serialized data of Fixed Block Booking and Price By Range to individual post meta record for easier access |
bkap_410_update_block_pricing_option_values_in_new_way | In version 4.0.0 we were saving Fixed Block and Price by range value as yes no. Now in version 4.1.0 we are storing these options as "booking_fixed_block_enable" and "booking_block_price_enable" |
bkap_410_update_fixed_blocks | Fetch fixed blocks records from booking_fixed_blocks and update data in the woocomemrce_booking_settings post meta. |
bkap_410_update_price_ranges | Fetch price ranges records from wp_booking_fixed_blocks and wp_booking_block_price_meta and update data in the woocomemrce_booking_settings post meta. |
bkap_410_update_settings | Will be run once on updating to version 4.1.0 or higher |
bkap_420_add_gcal_posts | This function will add a google calendar import post for all the existing unmapped events for the admin calendars. This is being done to ensure that the existing unmapped events are visible on the new Import page after upgrading the plugin. |
bkap_420_add_gcal_tour_posts | This function will add a google calendar import post for all the existing unmapped events for the tour operator calendars. This is being done to ensure that the existing unmapped events are visible on the new Import page after upgrading the plugin. |
bkap_420_gcal_batch_size | Returns the number of batches (of 500 each) that are present for imported events from Google Calendar |
bkap_420_gcal_meta | This function will add a post meta record '_bkap_gcal_event_uid' for all booking posts. This is being done to ensure orders created from imported events are displayed in the new View Bookings page. |
bkap_420_update_settings | Creates bkap_booking posts for Order Items not having Booking details in post and post_meta This is done for all the bookings placed before the plugin was updated to v4.0.0 |
bkap_db_420_1 | Function to run the first step of DB Upgrade to version 4.2.0 |
bkap_db_420_2 | Runs the second step of the DB update to version 4.2.0 |
bkap_find_matching_product_variation | This function will return the variation ID of default variation for a given variable product. |
bkap_get_db_count | Returns the number of steps that need to be run for the DB Upgrade for v4.2.0. Migration of existing bookings to booking posts |
bkap_get_post_meta | This function will fetch the individual booking settings saved in post meta and push them in a single array and return the same. |
bkap_manual_db_update_v420 | Runs the DB Update process manually for v4.2.0 |
bkap_orderby_date_key | This function will sort the array by ascending order. Key of the array should be date in d-m-Y format |
bkap_sort_by_from_time | This function is used to sort the timeslot by from time ascending order |
create_posts | Create GCAL posts for all the imported events |