Class bkap_calendar_sync
Class for Google Calendar 2 way sync for bookings
Author: Tyche Softwares
Class: bkap_calendar_sync
Located at bkap-calendar-sync.php
Methods summary
public
|
|
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. |
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. |
public
|
|
public
|
#
bkap_google_calendar_update_order_meta( integer $order_id )
This function adds booking to the Google Calendar if automated sync is enabled. |
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. |
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. |
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. |
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 |
public
|
#
bkap_add_buttons_emails( object $bkap )
Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons in WooCommerce emails |
public
|
#
bkap_add_buttons( object $bkap )
Creates 'Add to Google Calendar' & 'Add to Other Calendar' buttons on WooCommerce pages. |
public
|
#
bkap_save_ics_url_feed( )
Save the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX |
public
|
#
bkap_delete_ics_url_feed( )
Delete the Google Import URL Feeds from Booking->Settings->Google Calendar Sync Settings->Import Events Called via AJAX |
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. |
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. |
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. |
public static
object
|
|
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. |