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

Packages

  • None
  • Product-Delivery-Date-Pro-for-WooCommerce
    • Addon
    • Admin
      • Settings
        • Field-Labels
        • General
        • Google-Sync
      • View-Deliveries
    • Calendar
    • Common-Functions
    • Configuration
    • Delivery-Charges
    • Edit-Deliveries
    • Emails
    • Frontend
      • Cart
      • Checkout
    • Google-Calendar
    • Languages
    • License
    • Reschedule-Deliveries
    • View-Deliveries

Classes

  • ts_google_calendar_sync
  • TsGcal

Class ts_google_calendar_sync

PRDDD Handles the two way Google Calendar sync.

Package: Product-Delivery-Date-Pro-for-WooCommerce\Google-Calendar
Author: Tyche Softwares
Since: 1.0
Located at ts-google-calendar-sync.php

Methods summary

public
# __construct( )

Default Constructor

Default Constructor

Since

1.0
public string
# prdd_new_order_email( string $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.

Parameters

$subject
Email subject

Returns

string

Since

1.0

Hook

woocommerce_email_subject_new_order
public string
# prdd_customer_email( string $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.

Parameters

$subject
Email subject

Returns

string

Since

1.0

Hook

woocommerce_email_subject_customer_processing_order
woocommerce_email_subject_customer_on_hold_order
woocommerce_email_subject_customer_completed_order
public
# prdd_setup_gcal_sync( )

Adds the GCal class file

Adds the GCal class file

Since

1.0

Hook

wp_loaded
admin_init
public
# prdd_add_to_calendar_customer( integer $item_id, resource $item, resource $order )

Adds buttons on WooCommerce Order received page using which customers can add deliveries into their calendars.

Adds buttons on WooCommerce Order received page using which customers can add deliveries into their calendars.

Parameters

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

Since

1.0

Hook

woocommerce_order_item_meta_end
public
# prdd_add_to_calendar_admin( integer $item_id, resource $item, resource $order )

Adds buttons on WooCommerce admin emails using which admin can add deliveries into their calendars.

Adds buttons on WooCommerce admin emails using which admin can add deliveries into their calendars.

Parameters

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

Since

1.0

Hook

woocommerce_order_item_meta_end
public
# prdd_add_to_woo_pages( integer $item_id, resource $item, resource $order )

Adds buttons to WooCommerce pages such as My Account page and Thank you page based on settings which allow the ability to add deliveries 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 deliveries to the calendar.

Parameters

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

Since

1.0

Hook

woocommerce_order_item_meta_end
public resource
# prdd_create_gcal_obj( integer $item_id, resource $item, resource $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 Object

Returns

resource
Contains delivery details

Since

1.0
public
# prdd_add_buttons_emails( resource $prdd )

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

$prdd
Contains Delivery Details

Since

1.0
public
# prdd_add_buttons( resource $prdd )

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

$prdd
Contains Delivery Details

Since

1.0
public
# prdd_admin_delivery_calendar_events( )

Export deliveries to Google Calendar from the Product Delivery Date->View Deliveries->Add to Calendar button. This is especially used to export deliveries for orders that were placed before automated Google Calendar Sync is enabled.

Export deliveries to Google Calendar from the Product Delivery Date->View Deliveries->Add to Calendar button. This is especially used to export deliveries for orders that were placed before automated Google Calendar Sync is enabled.

Since

1.0

Globals

resource $wpdb

Hook

wp_ajax_prdd_admin_delivery_calendar_events
API documentation generated by ApiGen