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_special_delivery_price
  • prdd_timeslot_price

Class prdd_special_delivery_price

Weekday delivery charges class.

Package: Product-Delivery-Date-Pro-for-WooCommerce\Delivery-Charges
Author: Tyche Softwares
Since: 1.0
Located at prdd-special-delivery-price.php

Methods summary

public
# __construct( )

Default constructor

Default constructor

Since

1.0
public
# prdd_special_delivery_price_tab( integer|string $product_id )

Adds Delivery charges tab on edit product page in admin.

Adds Delivery charges tab on edit product page in admin.

Parameters

$product_id
Product ID.

Since

1.0

Hook

prdd_add_tabs
public
# prdd_load_ajax_special_delivery_price_block( )

This function is used to load ajax functions required by weekday block delivery.

This function is used to load ajax functions required by weekday block delivery.

Since

1.0

Hook

init
public
# prdd_special_delivery_price_show_field_settings( integer|string $product_id )

Adds the Add Delivery charges fields on the Delivery Charges tab.

Adds the Add Delivery charges fields on the Delivery Charges tab.

Parameters

$product_id
Product ID.

Since

1.0

Globals

resource $wpdb WordPress object.
resource $post WordPress post object.

Hook

prdd_after_listing_enabled
public
# prdd_save_special_delivery_price( )

This function is used to add/update delivery charges.

This function is used to add/update delivery charges.

Since

1.0

Globals

resource $wpdb WordPress object.

Hook

wp_ajax_nopriv_prdd_save_special_delivery_price
wp_ajax_prdd_save_special_delivery_price
public
# prdd_delete_special_delivery( )

This function is used to delete selected delivery charge.

This function is used to delete selected delivery charge.

Since

1.0

Globals

resource $wpdb WordPress object.

Hook

wp_ajax_nopriv_prdd_delete_special_delivery
wp_ajax_prdd_delete_special_delivery
public
# prdd_delete_all_special_delivery( )

This function is used to delete all added delivery charge.

This function is used to delete all added delivery charge.

Since

1.0

Hook

wp_ajax_nopriv_prdd_delete_all_special_delivery
wp_ajax_prdd_delete_all_special_delivery
public string
# get_price( integer|string $product_id, string $delivery_date )

Returns delivery charges added for the selected delivery date for the product.

Returns delivery charges added for the selected delivery date for the product.

Parameters

$product_id
Product ID.
$delivery_date
Selected delivery date.

Returns

string
Delivery charges.

Since

1.0
public array
# special_delivery_add_to_cart( array $cart_arr, integer|string $product_id, integer|string $variation_id, array $cart_item_meta )

Add delivery charges to the cart item when add to cart button is clicked

Add delivery charges to the cart item when add to cart button is clicked

Parameters

$cart_arr
WooCommerce cart array.
$product_id
Product ID.
$variation_id
Variation ID for the selected attributes.
$cart_item_meta
Cart item meta array.

Returns

array
WooCommerce cart array.

Since

1.0

Globals

resource $woocommerce WooCommerce object.

Hook

prdd_addon_add_cart_item_data
public static string
# prdd_get_special_delivery_price( integer|string $product_id, string $delivery_date, array $date_array )

Returns delivery charges added for the selected delivery date for the product.

Returns delivery charges added for the selected delivery date for the product.

Parameters

$product_id
Product ID.
$delivery_date
Selected delivery date.
$date_array
Array of dates for which charges are already added to the cart.

Returns

string
Delivery charges.

Since

1.0
public array
# get_special_delivery_cart_item_from_session( array $cart_item, array $values )

This function adjust the prices calculated from the plugin in the cart session.

This function adjust the prices calculated from the plugin in the cart session.

Parameters

$cart_item
Cart item data.
$values
$_POST values.

Returns

array
Cart item data with delivery details.

Since

1.0

Hook

prdd_get_cart_item_from_session
public array
# add_cart_item( array $cart_item )

This function adjust the extra prices for the product with the price calculated from the plugin.

This function adjust the extra prices for the product with the price calculated from the plugin.

Parameters

$cart_item
Cart item array

Returns

array
Cart item array with adjusted price

Since

1.0

Globals

resource $wpdb WordPress object
public array
# get_item_data( array $other_data, array $cart_item )

This function adds the special pricing data on the Cart and Checkout page.

This function adds the special pricing data on the Cart and Checkout page.

Parameters

$other_data
Additional data to be displayed.
$cart_item
Cart item data.

Returns

array
Additional data to be displayed with delivery fields.

Since

1.0

Hook

prdd_get_item_data
public
# order_item_meta( array $values, resource $order )

Add Delivery Charges as order item meta when order is placed.

Add Delivery Charges as order item meta when order is placed.

Parameters

$values
Cart item values.
$order
Order object.

Since

1.0

Globals

resource $wpdb WordPress object.

Hook

prdd_update_order
API documentation generated by ApiGen