Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hook Reference
  • Docs Home

Packages

  • BKAP
    • Addons
    • Admin-Bookings
    • Attribute-Lockout
    • Block-Pricing
    • Booking-Box
    • Booking-Confirmation
    • Booking-Process
    • Cancel-Order
    • Cart
    • Checkout-Process
    • Core
    • Date-Time
    • Emails
    • Functions
    • Global-Function
    • Global-Settings
    • Google-Calendar-Sync
    • ICS
    • Import-Booking
    • Labels
    • License
    • Menus
    • Meta-Boxes
    • Reschedule
    • Resources
    • Search-Widget
    • Special-Price
    • Uninstall
    • Validation
    • Variation-Lockout
    • Vendors
      • Dokan
      • WC-Vendors
    • View-Bookings
  • None

Classes

  • woocommerce_booking

Functions

  • bkap_update_po_file
  • is_booking_active

Class woocommerce_booking

Booking & Appointment Plugin Core Class

Package: BKAP
Class: woocommerce_booking
Located at woocommerce-booking.php

Methods summary

public
# __construct( )

Default constructor

Default constructor

Since

1.0
public static
# bkap_meta_box_save1( string|integer $post_id, WP_Post $post )

Save details of Resources availability

Save details of Resources availability

Parameters

$post_id
Resource Post ID
$post
Resource Post

Since

4.6.0

Todo

Change the function name to meaningful
public static
# bkap_define_constants( )

Define constants to be used accross the plugin

Define constants to be used accross the plugin

Since

4.6.0
public static boolean
# bkap_check_woo_installed( )

Check if WooCommerce is active.

Check if WooCommerce is active.

Returns

boolean
Returns true if WooCommerce installed else false

Since

1.7.0
public static
# bkap_check_compatibility( )

Ensure that the booking plugin is deactivated when WooCommerce is deactivated.

Ensure that the booking plugin is deactivated when WooCommerce is deactivated.

Since

1.7.0
public static
# bkap_disabled_notice( )

Display a notice in the admin Plugins page if the booking plugin is activated while WooCommerce is deactivated.

Display a notice in the admin Plugins page if the booking plugin is activated while WooCommerce is deactivated.

Since

1.7.0
public static
# bkap_include_files( )

Include the dependent plugin files

Include the dependent plugin files

Since

1.7.0
public static array
# bkap_plugin_row_meta( mixed $links, mixed $file )

Show row meta on the plugin screen.

Show row meta on the plugin screen.

Parameters

$links
Plugin Row Meta
$file
Plugin Base file

Returns

array
Links to be added along with the plugin information

Since

1.7.0
public array
# bkap_plugin_settings_link( array $links )

Settings link on Plugins page

Settings link on Plugins page

Parameters

$links
Exisiting Links present on Plugins information section

Returns

array
Modified array containing the settings link added

Since

1.7.0
public
# bkap_book_load_ajax( )

This function is used to load ajax functions required by plugin.

This function is used to load ajax functions required by plugin.

Since

1.7.0
public
# bkap_book_load_ajax_admin( )

Load Admin Ajax used accross the plugin

Load Admin Ajax used accross the plugin

Since

1.7.0
public
# bkap_product_duplicate( integer $new_id, WP_Post $post )

This function duplicates the booking settings of the original product to the new product.

This function duplicates the booking settings of the original product to the new product.

Parameters

$new_id
Product ID
$post
Product Post Object

Since

4.0.0

Globals

mixed $wpdb Global wpdb object
public
# bkap_bookings_update_db_check( )

This function is executed when the plugin is updated using the Automatic Updater. It calls the bookings_activate function which will check the table structures for the plugin and make any changes if necessary.

This function is executed when the plugin is updated using the Automatic Updater. It calls the bookings_activate function which will check the table structures for the plugin and make any changes if necessary.

Since

2.4.4

Globals

string $booking_plugin_version Live Booking Plugin version
string $BookUpdateChecker Current Installed Version
mixed $wpdb Global wpdb object
public static
# bkap_update_db_notice( )

Adds a notification for the admin to update the DB manually. This notification is added only if the auto update fails

Adds a notification for the admin to update the DB manually. This notification is added only if the auto update fails

Since

4.0.0

Globals

mixed $wpdb Global wpdb object
public boolean
# bkap_manual_db_update( )

Runs via ajax. Tries to update the DB manually.

Runs via ajax. Tries to update the DB manually.

Returns

boolean
Manual Update Status

Since

4.0.0

Globals

mixed $wpdb Global wpdb object
public boolean
# bkap_manual_db_update_f_p( )

Runs via ajax. Tries to update the DB manually.

Runs via ajax. Tries to update the DB manually.

Returns

boolean
Update Status

Since

4.1.0

Globals

mixed $wpdb Global wpdb object
public string
# get_booking_version( )

This function returns the booking plugin version number

This function returns the booking plugin version number

Returns

string
Current Plugin Version

Since

2.0.0
public
# bkap_bookings_activate( )

This function detects when the booking plugin is activated and creates all the tables necessary in database, if they do not exists.

This function detects when the booking plugin is activated and creates all the tables necessary in database, if they do not exists.

Globals

mixed $wpdb Global wpdb object
public
# bkap_vertical_my_enqueue_scripts_css( )

Enqueue zozo CSS for product pages

Enqueue zozo CSS for product pages

Since

4.0.0

Todo

replace get_option with the function declared above to fetch version number
public
# bkap_my_enqueue_scripts_css( )

This function include css files required for admin side.

This function include css files required for admin side.

Globals

mixed $wpdb Global wpdb object
public
# bkap_my_enqueue_scripts_js( )

This function includes js files required for admin side.

This function includes js files required for admin side.

Since

1.0.0
public static
# localize_script( string|integer $vendor_id = '' )

Localize parameters for calendar JS files

Localize parameters for calendar JS files

Parameters

$vendor_id
Vendor ID

Since

4.6.0
public static
# bkap_localize_view_booking( )

Localize parameters for View Bookings Page scripts to be enqueued

Localize parameters for View Bookings Page scripts to be enqueued

Since

4.6.0
public static
# bkap_booking_calender_content( )

Called during AJAX request for qtip content for a calendar item

Called during AJAX request for qtip content for a calendar item

Since

2.0.0
public
# bkap_front_side_scripts_js( )

This function will call common function to includes js files required for frontend.

This function will call common function to includes js files required for frontend.

Since

1.0.0

Globals

WP_Post $post Post Object
public static
# include_frontend_scripts_js( string|integer $product_id )

Include Front End scripts (JS) for Datepicker dependencies

Include Front End scripts (JS) for Datepicker dependencies

Parameters

$product_id
Product ID

Since

4.2.0
public
# bkap_front_side_scripts_css( )

This function will call common function to includes css files required for frontend.

This function will call common function to includes css files required for frontend.

Since

1.0.0

Globals

WP_Post $post Post Object
public static
# inlcude_frontend_scripts_css( string|integer $product_id )

Include Front End scripts (CSS) for Datepicker dependencies

Include Front End scripts (CSS) for Datepicker dependencies

Parameters

$product_id
Product ID

Since

4.2.0
public mixed
# bkap_get_date_lockout( string $start_date )

This function returns the number of bookings done for a date.

This function returns the number of bookings done for a date.

Parameters

$start_date
Date for which number of Bookings needs to fetched

Returns

mixed
Booking Data

Since

4.0.0

Globals

mixed $wpdb wpdb global variable
WP_Post $post Post Global Object
public
# bkap_remove_time_slot( )

This function updates to "Inactive" a single time slot from View/Delete Booking date, Timeslots.

This function updates to "Inactive" a single time slot from View/Delete Booking date, Timeslots.

public
# bkap_remove_specific( )

This function updates all dates to "Inactive" from View/Delete Booking date, Timeslots of specific day method.

This function updates all dates to "Inactive" from View/Delete Booking date, Timeslots of specific day method.

Since

1.7.0
public
# bkap_remove_recurring( )

This function updates all days to "Inactive" from View/Delete Booking date, Timeslots of recurring day method.

This function updates all days to "Inactive" from View/Delete Booking date, Timeslots of recurring day method.

Since

1.7.0
public
# bkap_register_fixed_block_string_for_wpml( )

This function used to register Fixed block booking's Block name string to WPML Like : Body, subject, Wc header text

This function used to register Fixed block booking's Block name string to WPML Like : Body, subject, Wc header text

Since

2.5.3
public
# bkap_load_edit_bookings_class( array $global_settings )

Function to load the Edit Booking Class to perform Bookings Edit on Cart and Checkout Page

Function to load the Edit Booking Class to perform Bookings Edit on Cart and Checkout Page

Parameters

$global_settings
Booking Global Settings

Since

4.1.0
public
# bkap_init_post_types( )

Register custom post types needed for the plugins.

Register custom post types needed for the plugins.

Since

4.1.0
public string
# bkap_change_create_booking_link( string $url, string $path )

Modify the current create booking URL to point to our new Create Booking Page

Modify the current create booking URL to point to our new Create Booking Page

Parameters

$url
URL in admin dashboard
$path
Current Path to check

Returns

string
Modified URL

Since

4.1.0
public
# bkap_add_meta_boxes( )

Include custom meta boxes templates for create Booking page

Include custom meta boxes templates for create Booking page

Since

4.1.0
public
# bkap_remove_submitdiv( )

Remove Submit meta box

Remove Submit meta box

Since

4.1.0
public
# bkap_trash_booking( )

Trashes/Deletes the booking and item from the order.

Trashes/Deletes the booking and item from the order.

Since

4.1.0

Globals

mixed $wpdb wpdb global variable
public static
# bkap_delete_booking( integer $booking_post_id )

Deletes the booking item from the order and sets the booking status to cancelled

Deletes the booking item from the order and sets the booking status to cancelled

Parameters

$booking_post_id
Booking Post ID to delete

Since

4.2.0

Globals

mixed $wpdb global variable
public array
# bkap_sanity_check( array $booking )

Checks the details of the booking post being edited. In case of any errors, it returns the list of errors.

Checks the details of the booking post being edited. In case of any errors, it returns the list of errors.

Parameters

$booking
Booking Data

Returns

array
Results of the sanity check

Since

4.2.0
public mixed
# bkap_meta_box_save( mixed $post_data, WP_Post $post )

This function saves the booking data for Edit Booking posts - from Woo->Orders

This function saves the booking data for Edit Booking posts - from Woo->Orders

Parameters

$post_data
Post Data to be saved
$post
Post Object

Returns

mixed
post_data if post is invalid else update the meta information

Since

4.1.0
public string
# add_time_slot( string $dropdown )

If the time slot is locked out, it still needs to be displayed if the booking is being edited. So add the time slot to the dropdown list for Edit Booking Post page.

If the time slot is locked out, it still needs to be displayed if the booking is being edited. So add the time slot to the dropdown list for Edit Booking Post page.

Parameters

$dropdown
Timeslots dropdown data

Returns

string
Timeslot dropdown data modified

Since

4.3.0
public static
# bkap_edit_bookings( string|integer $order_id, string|integer $item_id, string $old_start, string $old_end, string $old_time, string|integer $product_id )

Update the bookings after Confirm Booking is clicked

Update the bookings after Confirm Booking is clicked

Parameters

$order_id
Order ID
$item_id
Item ID
$old_start
Previous Start Date
$old_end
Previous End Date
$old_time
Previous Time Details
$product_id
Product ID

Since

4.1.0
API documentation generated by ApiGen