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

Packages

  • None
  • Order-Delivery-Date-Pro-for-WooCommerce
    • Admin
      • Edit-Order
      • Non-Sensitive-Data-Capture
      • Settings
        • Custom-Delivery
        • General
        • Google-Calendar-Sync
    • Class-ORDDD-Email-Manager
    • Common-Functions
    • Delivery-Calendar
    • Emails
      • Class-ORDDD-Email-Update-Date
    • Filter
    • Frontend
      • Checkout-Page-Processes
      • ICS-Files-Data
    • Google-Calendar
    • Integration
    • Lang
    • License
    • Plugin-Updates
      • EDD-SL-Plugin-Updater

Classes

  • orddd_common

Class orddd_common

Common functions used in the plugin

Package: Order-Delivery-Date-Pro-for-WooCommerce\Common-Functions
Author: Tyche Softwares
Class: orddd_common
Located at orddd-common.php

Methods summary

public static string
# delivery_date_language( string $delivery_date_formatted, string $delivery_date_timestamp )

Return the date with the selected langauge in Appearance tab

Return the date with the selected langauge in Appearance tab

Parameters

$delivery_date_formatted
Selected date
$delivery_date_timestamp
Unix timestamp of the selected date

Returns

string
Selected delivery date in the translated language

Since

2.6.3

Globals

array $orddd_languages Languages array
array $orddd_languages_locale Languages locale array
public static string
# orddd_get_order_delivery_date( integer $order_id )

Returns delivery date for an order

Returns delivery date for an order

Parameters

$order_id
Order ID

Returns

string
Delivery date for an order

Since

2.6.3

Globals

array $orddd_date_formats Date formats array
public static string
# orddd_get_order_timeslot( integer $order_id, boolean $is_subscription_parent_order = false )

Returns time slot for an order

Returns time slot for an order

Parameters

$order_id
Order ID
$is_subscription_parent_order
True if it is a renewal order, else false.

Returns

string
Time slot for an order

Since

2.6.3
public static array
# orddd_get_betweendays( string $FromDate, string $ToDate )

Returns between days from a start date till end date

Returns between days from a start date till end date

Parameters

$FromDate
Start date of the range
$ToDate
End date of the range

Returns

array
Dates between the start and the end date

Since

2.8.4
public static integer
# get_shipping_setting_option_key( integer $row_id )

Returns option key to update the Custom Delivery Settings in options table

Returns option key to update the Custom Delivery Settings in options table

Parameters

$row_id
Custom settings row id.

Returns

integer
Option key

Since

3.0
public static string
# orddd_time_settings_enable_for_custom_delivery( )

Returns yes if the time settings is enabled for the Custom Delivery Setting

Returns yes if the time settings is enabled for the Custom Delivery Setting

Returns

string

Since

3.0

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_timestamp( string $delivery_date, string $date_format, array $time_setting )

Returns timestamp for the selected delivery date

Returns timestamp for the selected delivery date

Parameters

$delivery_date
Selected delivery date
$date_format
Selected date format
$time_setting
Settings for the time range

Returns

string

Since

1.0
public static string
# load_hidden_fields( )

Load hidden fields on the checkout page

Load hidden fields on the checkout page

Returns

string

Since

1.0

Globals

resource $wpdb WordPress object
resource $post WordPress post object
resource $woocommerce WooCommerce object
array $orddd_date_formats Date formats array
array $orddd_languages Languages array
array $orddd_weekdays Weekdays array
array $orddd_shipping_days Shipping weekdays array
public static string
# orddd_get_zone_id( array $post_array = array(), boolean $is_ajax = true )

Get the zone id for the address on the checkout page

Get the zone id for the address on the checkout page

Parameters

$post_array
Post variables
$is_ajax
True if called from ajax, else false.

Returns

string
Return zone id if not called from ajax

Since

6.7

Globals

resource $wpdb WordPress object
resource $post WordPress post object
resource $woocommerce WooCommerce object
public static string
# orddd_shipping_methods_for_custom( )

Check if the custom delivery setting is added for the shipping method or product category

Check if the custom delivery setting is added for the shipping method or product category

Returns

string
yes if the custom delivery settings is added, else no.

Since

3.0

Globals

resource $wpdb WordPress object
public static array
# get_datepicker_options( string $holidays_str, string $lockout_str )

Options for JQuery Datepicker

Options for JQuery Datepicker

Parameters

$holidays_str
Added holidays
$lockout_str
Booked days for delivery

Returns

array
Options to enable on datepicker

Since

1.0
public static string
# get_disabled_days( )

Get days to disable on the calendar when the same day or next day is enabled.

Get days to disable on the calendar when the same day or next day is enabled.

Returns

string
String of the days to disable in the calendar.

Since

1.0

Globals

array $orddd_shipping_days Shipping weekdays array
array $orddd_weekdays Weekdays array
public static
# orddd_cancel_delivery_for_trashed( integer $order_id )

Free up delivery date & time when the order is moved to trash

Free up delivery date & time when the order is moved to trash

Parameters

$order_id
Order ID

Since

3.2

Globals

string $typenow Current page

Hook

wp_trash_post
public static
# orddd_untrash_order( integer $post_id )

Block the delivery date & time again when the order is restored from the trash

Block the delivery date & time again when the order is restored from the trash

Parameters

$post_id
Order ID

Since

7.5

Hook

untrash_post
public static
# orddd_restore_deliveries( integer $order_id, string $old_status, string $new_status )

Restoring the deliveries when the order status is changed from cancelled/refunded/failed.

Restoring the deliveries when the order status is changed from cancelled/refunded/failed.

Parameters

$order_id
Order ID
$old_status
Previous status of the order
$new_status
New status of the order

Since

7.5

Hook

woocommerce_order_status_changed
public static
# orddd_cancel_delivery( integer $order_id )

Cancel Delivery for the order when the order status is cancelled/refunded/failed.

Cancel Delivery for the order when the order status is cancelled/refunded/failed.

Parameters

$order_id
Order ID

Since

3.2

Globals

resource $wpdb WordPress Object
string $typenow Current page

Hook

woocommerce_order_status_cancelled
woocommerce_order_status_refunded
woocommerce_order_status_failed
public static string
# orddd_admin_product_has_delivery( integer $product_id )

Check if delivery is enabled for the product category

Check if delivery is enabled for the product category

Parameters

$product_id
Product ID

Returns

string
'on' if the delivery is enabled for the product category, else off.

Since

2.8.6
public static string
# orddd_get_shipping_based_settings( )

Return the custom delivery settings added in the admin

Return the custom delivery settings added in the admin

Returns

string
Custom delivery settings

Since

3.0
public static string
# orddd_get_shipping_method_str( array $shipping_settings )

Return the selected settings by option value of the custom delivery settings added in the admin

Return the selected settings by option value of the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Custom delivery settings

Since

3.0
public static string
# orddd_get_shipping_methods_for_categories( array $shipping_settings )

Return the selected shipping method/shipping class/product category for the custom delivery settings added in the admin

Return the selected shipping method/shipping class/product category for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Selected shipping method/shipping class/product category for the Custom delivery settings

Since

3.0
public static string
# orddd_get_shipping_enable_delivery_date( array $shipping_settings )

Return the enable delivery date checkbox value for the custom delivery settings added in the admin

Return the enable delivery date checkbox value for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Enable delivery date checkbox value

Since

3.0
public static string
# orddd_get_shipping_delivery_checkout_option( array $shipping_settings )

Return the delivery checkout option radio button value for the custom delivery settings added in the admin

Return the delivery checkout option radio button value for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Delivery checkout option value

Since

3.0
public static string
# orddd_get_shipping_orddd_min_between_days( array $shipping_settings )

Return the min range for text block value for the custom delivery settings added in the admin

Return the min range for text block value for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Minimum between days range value

Since

3.0
public static string
# orddd_get_shipping_orddd_max_between_days( array $shipping_settings )

Return the max range for text block value for the custom delivery settings added in the admin

Return the max range for text block value for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Maximum between days range value

Since

3.0
public static string
# orddd_get_shipping_minimum_delivery_time( array $shipping_settings )

Return the minimum delivery time in hours for the custom delivery settings added in the admin

Return the minimum delivery time in hours for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Minimum Delivery Time for the settings

Since

3.0
public static string
# orddd_get_shipping_date_field_label( array $shipping_settings )

Return the delivery date field label for the custom delivery settings added in the admin

Return the delivery date field label for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Delivery Date field label for the settings

Since

3.0
public static string
# orddd_get_shipping_time_field_label( array $shipping_settings )

Return the delivery time field label for the custom delivery settings added in the admin

Return the delivery time field label for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Delivery time field label for the settings

Since

3.0
public static string
# orddd_get_shipping_hidden_variables( array $shipping_settings, string $timeslot_field_mandatory )

Return the hiiden variables to be set for the custom delivery settings added in the admin

Return the hiiden variables to be set for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added
$timeslot_field_mandatory
Whether the timeslot field is mandatory or not

Returns

string
Hidden field to be set for the settings

Since

3.0

Globals

array $orddd_weekdays Weekdays array
array $orddd_shipping_days Shipping weekdays array
public static string
# orddd_get_shipping_time_settings_variable( array $shipping_settings, string $holidays_str, string $lockout_str )

Return the options to be set for the time sliders for custom delivery settings added in the admin

Return the options to be set for the time sliders for custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added
$holidays_str
Holidays added for the settings
$lockout_str
Booked days for the settings

Returns

string
Options to be set for the time sliders settings

Since

3.0
public static string
# orddd_get_shipping_from_time( array $time_settings, array $shipping_settings, string $holidays_str, string $lockout_str )

Return the from time set for the time sliders for custom delivery settings added in the admin

Return the from time set for the time sliders for custom delivery settings added in the admin

Parameters

$time_settings
Settings for the time sliders
$shipping_settings
Custom settings added
$holidays_str
Holidays added for the settings
$lockout_str
Booked days for the settings

Returns

string
From time set for the time sliders

Since

3.0
public static string
# orddd_get_shipping_date_field_mandatory( array $shipping_settings )

Return the delivery date field mandatory checkbox value for custom delivery settings added in the admin

Return the delivery date field mandatory checkbox value for custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Delivery date field mandatory checkbox value

Since

3.0
public static string
# orddd_is_shipping_timeslot_enable( array $shipping_settings )

Check whether the time slod is enabled for the custom delivery settings added in the admin

Check whether the time slod is enabled for the custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
'on' if the timeslots are added for the custom settings, else blank.

Since

3.0
public static string
# orddd_get_shipping_time_field_mandatory( array $shipping_settings )

Return the delivery time field mandatory checkbox value for custom delivery settings added in the admin

Return the delivery time field mandatory checkbox value for custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added

Returns

string
Delivery time field mandatory checkbox value

Since

3.0
public static string
# orddd_get_shipping_disabled_days_str( array $shipping_settings, array $same_day, array $next_day )

Return the delivery dates to disabled when same or next day is enabled for custom delivery settings added in the admin

Return the delivery dates to disabled when same or next day is enabled for custom delivery settings added in the admin

Parameters

$shipping_settings
Custom settings added
$same_day
Same day settings added
$next_day
Next day settings added

Returns

string
Delivery dates to disable in the calendar

Since

3.0

Globals

array $orddd_shipping_days Shipping weekdays array
array $orddd_weekdays Weekdays array
public static array
# orddd_common_delivery_days_for_product_category( string $orddd_shipping_id, boolean $is_ajax = false )

Return the common delivery days/dates enabled when the multiple product categories/shipping classes are added to the cart

Return the common delivery days/dates enabled when the multiple product categories/shipping classes are added to the cart

Parameters

$orddd_shipping_id
Shipping method selected
$is_ajax
True if called from ajax, else false.

Returns

array
Common days array

Since

6.2

Globals

resource $woocommerce WooCommerce object
resource $wpdb WordPress object
array $orddd_weekdays Weekdays array
public static array
# orddd_get_common_delivery_dates( array $specific_dates, arrry $common_days, array $delivery_days )

Return the common delivery specific dates enabled when the multiple product categories are added to the cart

Return the common delivery specific dates enabled when the multiple product categories are added to the cart

Parameters

$specific_dates
Added specific dates for the custom delivery settings
$common_days
Common delivery days
$delivery_days
Weekdays enabled for the custom delivery settings.

Returns

array
Common specific dates array

Since

6.2
public static array
# orddd_get_common_delivery_days( array $delivery_days )

Return the common delivery weekdays enabled when the multiple product categories are added to the cart

Return the common delivery weekdays enabled when the multiple product categories are added to the cart

Parameters

$delivery_days
Weekdays enabled for the custom delivery settings.

Returns

array
Common delivery days array

Since

6.2
public static array
# orddd_get_shipping_settings( )

Return all custom settings added in admin

Return all custom settings added in admin

Returns

array
All custom delivery settings added

Since

3.0

Globals

resource $wpdb WordPress object
public static array
# orddd_get_cart_product_categories( boolean $is_ajax, integer $order_id )

Return all product categories for the products added to the cart

Return all product categories for the products added to the cart

Parameters

$is_ajax
True if called from ajax, else false.
$order_id
Order ID if called from admin, else blank.

Returns

array
All product categories for the products added to the cart

Since

7.5

Globals

resource $woocommerce WooCommerce object
public static string
# orddd_get_cart_shipping_classes( boolean $is_ajax, integer $order_id )

Return all shipping classes for the products added to the cart

Return all shipping classes for the products added to the cart

Parameters

$is_ajax
True if called from ajax, else false.
$order_id
Order ID if called from admin, else blank.

Returns

string
All shipping classes for the products added to the cart

Since

7.5

Globals

resource $woocommerce WooCommerce object
public static string
# orddd_get_product_category_for_higher_minimum_delivery_time( integer $order_id = '' )

Return product category which has the highest minimum delivery time added in the custom settings

Return product category which has the highest minimum delivery time added in the custom settings

Parameters

$order_id
Order ID

Returns

string
Product category which has the highest minimum delivery time

Since

6.2

Globals

resource $post WordPress post object
resource $wpdb WordPress object
public static integer
# orddd_get_higher_minimum_delivery_time( integer $order_id = '' )

Return the highest minimum delivery time added in the custom settings

Return the highest minimum delivery time added in the custom settings

Parameters

$order_id
Order ID

Returns

integer
Highest minimum delivery time

Since

6.2

Globals

resource $post WordPress post object
resource $wpdb WordPress object
resource $woocommerce WooCommerce object
public static string
# orddd_get_highest_same_day( integer $order_id = '' )

Return the highest same day cut-off time added in the custom settings

Return the highest same day cut-off time added in the custom settings

Parameters

$order_id
Order ID

Returns

string
Highest same day cut-off time

Since

7.5

Globals

resource $post WordPress post object
resource $wpdb WordPress object
resource $woocommerce WooCommerce object
public static string
# orddd_get_highest_next_day( integer $order_id = '' )

Return the highest next day cut-off time added in the custom settings

Return the highest next day cut-off time added in the custom settings

Parameters

$order_id
Order ID

Returns

string
Highest next day cut-off time

Since

7.5

Globals

resource $post WordPress post object
resource $wpdb WordPress object
resource $woocommerce WooCommerce object
public static string
# orddd_get_product_shipping_class( integer $order_id = '' )

Return Product shipping class for which settings loads on the checkout page

Return Product shipping class for which settings loads on the checkout page

Parameters

$order_id
Order ID

Returns

string
Shipping class

Since

3.7

Globals

resource $wpdb WordPress object
resource $woocommerce WooCommerce object
public static string
# get_base_shipping_class( string $shipping_class_id )

Returns the Shipping Class ID in the base language

Returns the Shipping Class ID in the base language

Parameters

$shipping_class_id
Translated Shipping Class ID

Returns

string
Shipping class id

Since

7.7
public static string
# ordd_get_shipping_class_slug( string $shipping_class_id )

Returns the Shipping Class Slug for the passed ID

Returns the Shipping Class Slug for the passed ID

Parameters

$shipping_class_id
Shipping Class ID

Returns

string
Shipping class id

Since

7.7
public static string
# orddd_get_shipping_class_for_higher_minimum_delivery_time( integer $order_id = '' )

Return shipping class which has the highest minimum delivery time added in the custom settings

Return shipping class which has the highest minimum delivery time added in the custom settings

Parameters

$order_id
Order ID

Returns

string
Shipping class which has the highest minimum delivery time

Since

6.2

Globals

resource $post WordPress post object
resource $wpdb WordPress object
public static string
# orddd_is_delivery_enabled( )

Checks if there is a Virtual/Featured product in cart and delivery is enable for these products or not

Checks if there is a Virtual/Featured product in cart and delivery is enable for these products or not

Returns

string
'yes' if delivery is enabled, else 'no'.

Since

2.7.6

Globals

resource $woocommerce WooCommerce object
public static string
# orddd_get_address_key( array $package )

Returns the address key of the address package from shipping multiple addresses plugin

Returns the address key of the address package from shipping multiple addresses plugin

Parameters

$package
Shipping Address content

Returns

string
Address key

Since

4.7
public static boolean
# get_wcms_session( )

Returns the addresses stored in session from shipping multiple addresses plugin

Returns the addresses stored in session from shipping multiple addresses plugin

Returns

boolean
True if addresses are present in session, else false.

Since

4.7
public static array
# orddd_get_total_orders_to_export( )

Returns the total number of orders to be exported to the google calendar

Returns the total number of orders to be exported to the google calendar

Returns

array
Total orders to export

Since

4.0

Globals

resource $wpdb WordPress object
public static array
# orddd_get_total_product_quantities( )

Returns the total product quantities added to the cart

Returns the total product quantities added to the cart

Returns

array
Total product quantities

Since

4.1

Globals

resource $woocommerce WooCommerce object
public static string
# orddd_get_shipping_method_enabled( )

Checks if the settings for shipping methods are added in custom delivery settings

Checks if the settings for shipping methods are added in custom delivery settings

Returns

string
'yes' if settings are added, else no.

Since

3.0

Globals

resource $wpdb WordPress object
public static string
# str_to_date_format( )

Convert php date formats mysql date formats

Convert php date formats mysql date formats

Returns

string
Mysql date format

Since

4.0
public static string
# orddd_get_formatted_shipping_customer_address( integer $user_id )

Return formatted shipping custom address

Return formatted shipping custom address

Parameters

$user_id
User ID

Returns

string
Formatted address

Since

4.7
public static array
# get_timeslot_values( string $time_slot )

Return the time slots in array format for the custom delivery settings

Return the time slots in array format for the custom delivery settings

Parameters

$time_slot
String for the time slots added for the custom delivery settings

Returns

array

Since

2.7
public static array
# orddd_get_timeslots( string $current_date, integer $dw, string $delivery_date )

Return all the time slots added for a day/date

Return all the time slots added for a day/date

Parameters

$current_date
Selected date
$dw
Weekday of current selected date
$delivery_date
Selected date in n-j-Y format

Returns

array

Since

2.7

Globals

resource $wpdb WordPress object
public static string
# orddd_compareDeepValue( array $val1, array $val2 )

Compare strings.

Compare strings.

Parameters

$val1
Array 1 value to compare
$val2
Array 2 value to compare

Returns

string
Compared value

Since

7.6

Todo

Unused function need to check and remove it
public static string
# orddd_get_timeslot_charges( string $time_slot )

Return time slot charges added for a time slot

Return time slot charges added for a time slot

Parameters

$time_slot
Time slot

Returns

string

Since

4.3

Globals

resource $wpdb WordPress object
public static array
# orddd_get_timeslot_lockout( )

Return the number of orders placed for a time slot for a date

Return the number of orders placed for a time slot for a date

Returns

array

Since

2.7

Globals

resource $wpdb WordPress object
public static array
# orddd_get_disabled_timeslot( )

Return all the time slots disabled

Return all the time slots disabled

Returns

array

Since

4.7
public static array
# get_timeslot_to_disable( integer $dw, string $delivery_date, array $disable_days )

Return all the time slots disabled for a date/weekday

Return all the time slots disabled for a date/weekday

Parameters

$dw
Weekday of the selected delivery date
$delivery_date
Selected delivery date
$disable_days
All the disabled time slots

Returns

array

Since

4.7
public static array
# get_min_date( integer $delivery_time_seconds, array $delivery_time_enabled, str $holidays_str, str $lockout_str, array $shipping_settings = array() )

Return the minimum delivery date & time

Return the minimum delivery date & time

Parameters

$delivery_time_seconds
Minimum delivery time in seconds
$delivery_time_enabled
Time slider settings
$holidays_str
Added holidays
$lockout_str
Booked days
$shipping_settings
Custom delivery settings

Returns

array

Since

1.0

Globals

array $orddd_shipping_days Shipping weekdays array
array $orddd_weekdays Weekdays array
public static string
# orddd_get_if_past_specific_dates( array $specific_dates )

Checks if all the added specific dates are past dates or not.

Checks if all the added specific dates are past dates or not.

Parameters

$specific_dates
Added specific dates

Returns

string
'Yes' if all dates added are past, else 'No'.

Since

7.5
public static integer
# get_minimum_delivery_time( )

Checks if all the added specific dates are past dates or not.

Checks if all the added specific dates are past dates or not.

Returns

integer
Minimum Delivery Time in hours

Since

5.2

Globals

resource $wpdb WordPress object
public static array
# orddd_get_timeslot_display( string $time_slot_for_order )

Checks if all the added specific dates are past dates or not.

Checks if all the added specific dates are past dates or not.

Parameters

$time_slot_for_order
Already added time slot if accessed from edit order page

Returns

array
All time slots for the selected delivery date

Since

2.7

Globals

resource $wpdb WordPress object
array $orddd_weekdays Weekdays array
public static resource
# dateTimeDiff( resource $date1, resource $date2 )

This function will return the differance days between two dates.

This function will return the differance days between two dates.

Parameters

$date1
Date 1 to compare
$date2
Date 2 to compare

Returns

resource
Result of the difference between the dates.

Since

5.5
public static array
# orddd_date_range_limit( string $start, string $end, integer $adj, string $a, string $b, array $result )

Calculates the difference between the dates.

Calculates the difference between the dates.

Parameters

$start
$end
$adj
adj
$a
$b
$result

Returns

array
$result

Since

5.5
public static array
# orddd_date_range_limit_days( array $base, array $result )

Calculates the Range Limit.

Calculates the Range Limit.

Parameters

$base
$result

Returns

array
$result

Since

5.5
public static array
# orddd_date_normalize( array $base, array $result )

Normalize the Date.

Normalize the Date.

Parameters

$base
$result

Returns

array
$result

Since

5.5
public static array
# orddd_previous_charges_label( integer $order_id )

Get previous added delivery charges labels for an order.

Get previous added delivery charges labels for an order.

Parameters

$order_id
Order ID

Returns

array
Previous added delivery charges labels

Since

5.7
public static
# orddd_update_delivery_charges( integer $order_id, string $delivery_date, string $time_slot )

Update delivery charges for edited delivery date on edit order page.

Update delivery charges for edited delivery date on edit order page.

Parameters

$order_id
Order ID
$delivery_date
Selected delivery date
$time_slot
Selected time slot

Since

5.7

Globals

resource $wpdb WordPress Object
public static array
# orddd_get_delivery_date_charges( integer $order_id, string $delivery_date, string $time_slot )

Get the delivery charges of the selected date and time

Get the delivery charges of the selected date and time

Parameters

$order_id
Order ID
$delivery_date
Selected delivery date
$time_slot
Selected time slot

Returns

array
Charges to be added for a delivery date & time

Since

5.7

Gloabls

resource $orddd_weekdays Weekdays array

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_shipping_method_for_order( resource $order )

Get the delivery charges of the selected date and time

Get the delivery charges of the selected date and time

Parameters

$order
WC_Order object

Returns

string
Shipping method for the order

Since

5.7
public static string
# orddd_get_shipping_service_name( string $usps_service_id )

Get service name for the USPS services from WooCommerce USPS shipping plugin

Get service name for the USPS services from WooCommerce USPS shipping plugin

Parameters

$usps_service_id
USPS service id

Returns

string
Service name

Since

6.1
public static string
# orddd_get_fedex_service_name( string $fedex_services_id )

Get service name for the fedex services

Get service name for the fedex services

Parameters

$fedex_services_id
Fedex service id

Returns

string
Service name

Since

7.2
public static array
# orddd_get_event_details( integer $order_id )

Get order details to be exported to the google calendar

Get order details to be exported to the google calendar

Parameters

$order_id
Order ID

Returns

array
Order details

Since

6.5
public static string
# orddd_get_text_block_shipping_date( integer $delivery_time_seconds )

Return estimated shipping date for text block

Return estimated shipping date for text block

Parameters

$delivery_time_seconds
Minimum Delivery Time in hours

Returns

string
Estimated shipping date

Since

6.6

Globals

array $orddd_date_formats Date formats array
public static string
# orddd_is_delivery_calendar_enabled_for_custom_delivery( )

Check if the delivery calendar is enabled for the custom setting

Check if the delivery calendar is enabled for the custom setting

Returns

string
'yes' if delivery calendar is enabled, else 'no'.

Since

6.6

Globals

resource $wpdb WordPress Object
public static string
# orddd_is_text_block_enabled_for_custom_delivery( )

Check if the text block is enabled for the custom setting

Check if the text block is enabled for the custom setting

Returns

string
'yes' if text block is enabled, else 'no'.

Since

6.6

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_delivery_date_field_label( string $shipping_method, string $product_category, string $shipping_class )

Get the delivery date field label for the custom setting on checkout page.

Get the delivery date field label for the custom setting on checkout page.

Parameters

$shipping_method
Selected shipping method
$product_category
Product categories of the product added to the cart.
$shipping_class
Shipping class assigned to the product.

Returns

string
Delivery date field label.

Since

7.5

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_delivery_time_field_label( string $shipping_method, string $product_category, string $shipping_class )

Get the delivery time field label for the custom setting on checkout page.

Get the delivery time field label for the custom setting on checkout page.

Parameters

$shipping_method
Selected shipping method
$product_category
Product categories of the product added to the cart.
$shipping_class
Shipping class assigned to the product.

Returns

string
Delivery time field label.

Since

7.5

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_order_shipping_method( integer $order_id )

Get the selected shipping method for an order.

Get the selected shipping method for an order.

Parameters

$order_id
Order ID

Returns

string
Shipping method

Since

7.5

Globals

resource $wpdb WordPress Object
public static string
# orddd_get_order_product_category( integer $order_id )

Get the product categories of the products added to an order

Get the product categories of the products added to an order

Parameters

$order_id
Order ID

Returns

string
Product category

Since

7.5
public static
# get_base_product_category( integer $cat_id )

Returns the Product Category ID in the base language

Returns the Product Category ID in the base language

Parameters

$cat_id
Translated Product category ID

Since

7.6.0
public static
# ordd_get_cat_slug( integer $category_id )

Returns the Category Slug for the passed ID

Returns the Category Slug for the passed ID

Parameters

$category_id
Product category ID

Since

7.6
API documentation generated by ApiGen