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

Packages

  • Product-Delivery-Date-Lite

Classes

  • woocommerce_prdd_lite

Functions

  • is_prdd_lite_active
  • prdd_lite_update_po_file

Class woocommerce_prdd_lite

Class for delivery date setting at back end and allowing to select the delivery date on the product page. It displays the delivery date on Cart, Checkout, Order received page and WooCommerce->Orders page.

Package: Product-Delivery-Date-Lite
Since: 1.0
Located at product-delivery-date-for-woocommerce-lite.php

Methods summary

public
# __construct( )

Constructor function for initializing settings

Constructor function for initializing settings

Since

1.0
public
# prdd_lite_activate( )

This function detects when the product delivery date plugin is activated.

This function detects when the product delivery date plugin is activated.

Since

1.0

Hook

register_activation_hook
public
# prdd_lite_update_db_check( )

This function is used to updating the version number in the database when the plugin is updated.

This function is used to updating the version number in the database when the plugin is updated.

Since

1.3

Hook

admin_init
public
# get_plugin_version( )

This function returns the product delivery date plugin version number.

This function returns the product delivery date plugin version number.

Since

1.3
public
# prdd_lite_box( )

This function adds a meta box for delivery settings on product page.

This function adds a meta box for delivery settings on product page.

Since

1.0

Hook

add_meta_boxes
public
# prdd_lite_process_box( integer $post_id, WP_Post $post )

This function updates the delivery settings for each product in the wp_postmeta table of the database. It will be called when update/publish button clicked on admin side.

This function updates the delivery settings for each product in the wp_postmeta table of the database. It will be called when update/publish button clicked on admin side.

Parameters

$post_id
Post ID
$post
WP_Post object

Since

1.0

Hook

woocommerce_process_product_meta
public
# prdd_lite_meta_box( )

This function displays the settings for the product in the Product Delivery Date meta box on the admin product page.

This function displays the settings for the product in the Product Delivery Date meta box on the admin product page.

Since

1.0
public
# prdd_lite_product_duplicate( integer $new_id, WP_Post $post )

This function duplicates the delivery settings of the original product to the new product.

This function duplicates the delivery settings of the original product to the new product.

Parameters

$new_id
new post ID
$post
Post object.

Since

1.0

Hook

woocommerce_duplicate_product
public
# prdd_lite_front_side_scripts_js( )

This function includes js files required for frontend.

This function includes js files required for frontend.

Since

1.0

Hook

woocommerce_before_single_product
public
# prdd_lite_front_side_scripts_css( )

This function includes CSS files required for frontend.

This function includes CSS files required for frontend.

Since

1.0

Hook

woocommerce_before_single_product
public
# prdd_lite_after_add_to_cart( )

This function add the Delivery Date fields on the frontend product page as per the settings selected when Enable Delivery Date is enabled.

This function add the Delivery Date fields on the frontend product page as per the settings selected when Enable Delivery Date is enabled.

Since

1.0

Hook

woocommerce_before_add_to_cart_button
public array
# prdd_lite_add_cart_item_data( integer $cart_item_meta, $product_id )

When "Add to cart" button is clicked on product page, this function returns the cart_item_meta with the delivery details of the product.

When "Add to cart" button is clicked on product page, this function returns the cart_item_meta with the delivery details of the product.

Parameters

$cart_item_meta
$product_id product's ID
$product_id

Returns

array
$cart_item_meta cart_item_meta array with the delivery details

Since

1.0

Hook

woocommerce_add_cart_item_data
public array
# prdd_lite_get_item_data( array $other_data, $cart_item )

This function displays the Delivery details on cart page, checkout page.

This function displays the Delivery details on cart page, checkout page.

Parameters

$other_data
$cart_item Delivery details and product details
$cart_item

Returns

array
$other_data array with delivery date and delivery date field name

Since

1.0

Hook

woocommerce_get_item_data
public array
# prdd_lite_hidden_order_itemmeta( $arr )

This function adds the delivery hidden fields with product array.

This function adds the delivery hidden fields with product array.

Returns

array
$arr array of hidden delivery date

Since

1.0

Hook

woocommerce_hidden_order_itemmeta
public
# prdd_lite_order_item_meta( integer $item_meta, array $cart_item )

This function updates the database for the delivery details and adds delivery fields on the Order Received page & WooCommerce->Orders page when an order is placed for WooCommerce version greater than 2.0.

This function updates the database for the delivery details and adds delivery fields on the Order Received page & WooCommerce->Orders page when an order is placed for WooCommerce version greater than 2.0.

Parameters

$item_meta
Order ID
$cart_item
product details

Since

1.0

Hook

woocommerce_checkout_update_order_meta
public integer
# prdd_lite_get_product_id( $product_id )

This function returns the product ID from WP_Post table.

This function returns the product ID from WP_Post table.

Returns

integer
$product_id product ID

Since

1.0
API documentation generated by ApiGen