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_estimate_delivery
  • prdd_process
  • prdd_validation

Class prdd_process

Frontend single product page processes.

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

Methods summary

public static
# prdd_before_add_to_cart( )

Hide Add to Cart button and Quantity field on single product page on frontend.

Hide Add to Cart button and Quantity field on single product page on frontend.

Since

1.0

Globals

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

Hook

woocommerce_before_add_to_cart_form
public static
# prdd_price_display_special_price( )

Adds a span to display the delivery charges on the Product page.

Adds a span to display the delivery charges on the Product page.

Since

1.0

Hook

woocommerce_before_add_to_cart_button
public static
# prdd_after_add_to_cart( )

Adds delivery fields on the frontend product page as per the settings selected when Enable Delivery Date is checked.

Adds delivery fields on the frontend product page as per the settings selected when Enable Delivery Date is checked.

Since

1.0

Globals

resource $post WordPress post object.
resource $wpdb WordPress object.
resource $woocommerce WooCommerce object.
array $prdd_date_formats Delivery Date formats.

Hook

woocommerce_before_add_to_cart_button
public static array
# prdd_localize_process_script( integer $post_id )

Localize and includes the js files on frontend product page.

Localize and includes the js files on frontend product page.

Parameters

$post_id
Product ID.

Returns

array
Hidden variables array to pass to JS files.

Since

1.0

Globals

resource $wpdb WordPress object.
resource $woocommerce WooCommerce object.
public static array
# prdd_get_additional_product_data( integer $post_id )

Returns the hidden variables array on the frontend single product page.

Returns the hidden variables array on the frontend single product page.

Parameters

$post_id
Product ID.

Returns

array
Hidden variables array.

Since

1.0

Globals

resource $wpdb WordPress object.
public static
# prdd_display_delivery_charge_callback( )

Display delivery charges on the frontend product page.

Display delivery charges on the frontend product page.

Since

1.0

Hook

wp_ajax_nopriv_prdd_display_delivery_charge
wp_ajax_prdd_display_delivery_charge
public static
# prdd_get_time_lockout( )

Display time slot availability message if the product is not available on Add to Cart button click.

Display time slot availability message if the product is not available on Add to Cart button click.

Since

1.0

Globals

resource $wpdb WordPress object.

Hook

wp_ajax_nopriv_prdd_get_time_lockout
wp_ajax_prdd_get_time_lockout
public static
# prdd_get_date_lockout( )

Display delivery date availability message if the product is not available on Add to Cart button click.

Display delivery date availability message if the product is not available on Add to Cart button click.

Since

1.0

Globals

resource $wpdb WordPress object.

Hook

wp_ajax_nopriv_prdd_get_date_lockout
wp_ajax_prdd_get_date_lockout
public static
# prdd_check_for_time_slot( )

Display the timeslots for the selected date on the frontend page when Enable time slot is enabled.

Display the timeslots for the selected date on the frontend page when Enable time slot is enabled.

Since

1.0

Hook

wp_ajax_nopriv_prdd_check_for_time_slot
wp_ajax_prdd_check_for_time_slot
public static string
# get_time_slot( string $current_date, integer $post_id )

This function prepares the time slots string to be displayed.

This function prepares the time slots string to be displayed.

Parameters

$current_date
Current selected delivery date.
$post_id
Product ID.

Returns

string
Returns timeslots string.

Since

1.0

Globals

resource $wpdb WordPress object.
public static
# prdd_get_selected_variation_id( integer $product_id, array $post_data )

This function is used to fetch the variation id of selected attribute on the front end.

This function is used to fetch the variation id of selected attribute on the front end.

Parameters

$product_id
Product ID.
$post_data
Post data array.

Since

1.0

Globals

resource $wpdb WordPress object.
API documentation generated by ApiGen