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

  • prdd_common

Functions

  • ts_get_option

Class prdd_common

Common functions class

Package: Product-Delivery-Date-Pro-for-WooCommerce\Common-Functions
Author: Tyche Softwares
Since: 1.0
Located at prdd-common.php

Methods summary

public static integer
# prdd_get_product_id( integer $product_id )

Returns the base product id when product is translated using WPML

Returns the base product id when product is translated using WPML

Parameters

$product_id
Product ID

Returns

integer
Base product id

Since

1.0

Globals

resource $wpdb WordPress object
public static integer
# prdd_get_price( integer $product_id, integer $variation_id, integer $product_type )

Returns the price of the product.

Returns the price of the product.

Parameters

$product_id
Product ID
$variation_id
Product variation ID for variable products.
$product_type
$product_id Product Type

Returns

integer
Price

Since

1.0
public static string
# prdd_get_product_type( integer $product_id )

Returns the type of the product.

Returns the type of the product.

Parameters

$product_id
Product ID

Returns

string
Product type

Since

1.0
public static integer
# prdd_multicurrency_price( integer $price, string $currency_selected )

Returns the converted price for the currency selected from multicurrency option in WPML.

Returns the converted price for the currency selected from multicurrency option in WPML.

Parameters

$price
Base product price
$currency_selected
$current_selected Currency selected from the switcher

Returns

integer
Converted price

Since

1.0
public static integer
# woo_product_addons_compatibility_cart( array $cart_item_meta )

Returns the WooCommerce Product Addons Options total

Returns the WooCommerce Product Addons Options total

Parameters

$cart_item_meta
Cart item data.

Returns

integer
WooCommerce Product Addons Options total

Since

1.0
public static integer
# prdd_get_parent_id( integer $child_id )

The function checks if the passed product ID is listed as a child in _children postmeta If yes, then it returns the parent product ID else it returns 0

The function checks if the passed product ID is listed as a child in _children postmeta If yes, then it returns the parent product ID else it returns 0

Parameters

$child_id
Child product ID.

Returns

integer
Parent ID.

Since

1.0

Globals

resource $wpdb WordPress Object
public static string
# prdd_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 shipping address

Since

1.0
public static array
# prdd_get_event_details( array $values, integer $order_id )

Return details to be exported to the gogole calendar.

Return details to be exported to the gogole calendar.

Parameters

$values
cart item array
$order_id
Order ID

Returns

array
Details to be exported to the google calendar

Since

1.0
public static array
# prdd_get_total_deliveries_to_export( )

Creates a list of orders that are not yet exported to GCal

Creates a list of orders that are not yet exported to GCal

Returns

array
$total_orders_to_export Order IDs to be exported

Since

1.0

Globals

resource $wpdb WordPress object
public static resource
# get_prdd_delivery( integer $item_id )

Returns delivery details

Returns delivery details

Parameters

$item_id
Cart item id

Returns

resource
Delivery object

Since

2.4

Globals

resource $wpdb WordPress object
API documentation generated by ApiGen