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

  • bkap_calendar_sync
  • BKAP_Gcal
  • BKAP_Gcal_Event
  • bkap_gcal_sync_settings
  • BKAP_Google_Events_View
  • product_gcal_settings
  • WAPBK_Import_Bookings_Table

Functions

  • bkap_import_events_cron
  • woocommerce_bkap_add_cron_schedule

Class bkap_calendar_sync

Class for Google Calendar 2 way sync for bookings

Package: BKAP\Google-Calendar-Sync
Author: Tyche Softwares
Class: bkap_calendar_sync
Located at bkap-calendar-sync.php

Methods summary

public
# __construct( )

Default constructor

Default constructor

Since

2.6.3
public
# bkap_new_order_email( $subject )

Set the global parameter to email subject Used to identify whether the WooCommerce email is being fired for the admin or the customer.

Set the global parameter to email subject Used to identify whether the WooCommerce email is being fired for the admin or the customer.

Since

2.6

Hook

woocommerce_email_subject_new_order
public
# bkap_customer_email( $subject )

Set the global parameter to email subject Used to identify whether the WooCommerce email is being fired for the admin or the customer.

Set the global parameter to email subject Used to identify whether the WooCommerce email is being fired for the admin or the customer.

Since

2.6

Hook

woocommerce_email_subject_customer_processing_order woocommerce_email_subject_customer_on_hold_order woocommerce_email_subject_customer_completed_order


public
# bkap_setup_gcal_sync( )

Adds the GCal class file

Adds the GCal class file

Since

2.6

Hook

admin_init - for admin side wp_loaded - for front end


public
# bkap_google_calendar_update_order_meta( integer $order_id )

This function adds booking to the Google Calendar if automated sync is enabled.

This function adds booking to the Google Calendar if automated sync is enabled.

Parameters

$order_id
  • Order ID for which bookings need to be synced

Since

2.6

Hook

woocommerce_checkout_update_order_meta
public
# bkap_add_to_calendar_customer( integer $item_id, WC_Order_Item_Product $item, WC_Order $order )

Adds buttons in the WooCommerce customer emails using which customers can add bookings into their calendars.

Adds buttons in the WooCommerce customer emails using which customers can add bookings into their calendars.

Parameters

$item_id
  • Item ID of the product
$item
  • Item Object
$order
  • Order Object

Since

2.6

Hook

woocommerce_order_item_meta_end
public
# bkap_add_to_calendar_admin( integer $item_id, WC_Order_Item_Product $item, WC_Order $order )

Adds buttons in the WooCommerce admin emails using which admin can add bookings into the calendar. Executed only when manual booking sync is enabled with appropriate settings.

Adds buttons in the WooCommerce admin emails using which admin can add bookings into the calendar. Executed only when manual booking sync is enabled with appropriate settings.

Parameters

$item_id
  • Item ID of the product
$item
  • Item Object
$order
  • Order Object

Since

2.6

Hook

woocommerce_order_item_meta_end
public
# bkap_add_to_woo_pages( integer $item_id, WC_Order_Item_Product $item, WC_Order $order )

Adds buttons to WooCommerce pages such as My Account page and Thank you page based on settings which allow the ability to add bookings to the calendar.

Adds buttons to WooCommerce pages such as My Account page and Thank you page based on settings which allow the ability to add bookings to the calendar.

Parameters

$item_id
  • Item ID of the product
$item
  • Item Object
$order
  • Order Object

Since

2.6

Hook

woocommerce_order_item_meta_end
public object
# bkap_create_gcal_obj( integer $item_id, WC_Order_Item_Product $item, WC_Order $order_details )

Returns an object which can be used to create 'Add to Calendar' buttons for Google Calendar Sync

Returns an object which can be used to create 'Add to Calendar' buttons for Google Calendar Sync

Parameters

$item_id
  • Item ID of the product
$item
  • Item Object
$order_details
$order - Order Object

Returns

object
$bkap - Contains booking details

Since

2.6
public
# bkap_add_buttons_emails( object $bkap )

Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons in WooCommerce emails

Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons in WooCommerce emails

Parameters

$bkap
  • Contains Booking Details

Since

2.6
public
# bkap_add_buttons( object $bkap )

Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons on WooCommerce pages.

Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons on WooCommerce pages.

Parameters

$bkap
  • Contains Booking Details

Since

2.6
public
# bkap_save_ics_url_feed( )

Save the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX

Save the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX

Since

2.6
public
# bkap_delete_ics_url_feed( )

Delete the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX

Delete the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX

Since

2.6
public
# bkap_setup_import( )

Gets the ICAL Data from Google Calendar when Import is performed (manual and automated) for all the Google Calendars setup in the plugin.

Gets the ICAL Data from Google Calendar when Import is performed (manual and automated) for all the Google Calendars setup in the plugin.

Since

2.6
public
# bkap_import_events( object $ical_array, integer $product_id = 0, boolean $airbnb = false )

Creates records for imported events and automatically maps the same (based on the settings) for the ICAL Data passed in.

Creates records for imported events and automatically maps the same (based on the settings) for the ICAL Data passed in.

Parameters

$ical_array
  • Contains all the events in the Google Calendar
$product_id
  • Product ID for which the ICAl feed is setup. 0 indicates global
$airbnb
  • Set to true for AirBNB calendars, else false.

Since

2.6
public static
# bkap_create_gcal_event_post( integer $bkap_event, integer $product_id, array $status, $option_name = '', $user_id = 1 )

Creates & returns a booking post meta record array to be inserted in post meta.

Creates & returns a booking post meta record array to be inserted in post meta.

Parameters

$bkap_event
$item_id - Item ID of the Product
$product_id
  • Product ID
$status
$booking_details - Array containing booking details
$option_name
$user_id

Since

4.2
public static object
# get_bkap_booking( array $id )

Creating the instance fo the BKAP_Gcal_Event

Creating the instance fo the BKAP_Gcal_Event

Parameters

$id
  • contains the event Details

Returns

object
BKAP_Booking

Since

4.2
public
# bkap_admin_booking_calendar_events( )

Export bookings to Google Calendar from the Booking->View Bookings->Add to Calendar button. This is especially used to export bookings for orders that were placed before Automated Google Calendar Sync is enabled.

Export bookings to Google Calendar from the Booking->View Bookings->Add to Calendar button. This is especially used to export bookings for orders that were placed before Automated Google Calendar Sync is enabled.

Since

2.6
API documentation generated by ApiGen