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_validation

Availability check on product page class

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

Methods summary

public static boolean
# prdd_get_validate_add_cart_item( boolean $passed, integer $product_id, integer $qty )

This functions validates the Availability for the selected date and timeslots.

This functions validates the Availability for the selected date and timeslots.

Parameters

$passed
$product_id
Product ID.
$qty

Returns

boolean
True if product should be added to cart, else false.

Since

1.0

Hook

woocommerce_add_to_cart_validation
public static string
# prdd_get_quantity( integer $post_id )

Checks the availabilty for the selected date and timeslot when the product is added to cart. If availability is less then selected it prevents product from being added to the cart and displays an error message.

Checks the availabilty for the selected date and timeslot when the product is added to cart. If availability is less then selected it prevents product from being added to the cart and displays an error message.

Parameters

$post_id
Product ID.

Returns

string
'yes' quantity check passes, else 'no'.

Since

1.0

Globals

resource $wpdb WordPress object
resource $woocommerce WooCommerce object
public static
# prdd_quantity_check( )

Checks availability for date and time slot on the cart page when quantity on cart page is changed.

Checks availability for date and time slot on the cart page when quantity on cart page is changed.

Since

1.0

Globals

resource $wpdb WordPress object
resource $woocommerce WooCommerce object

Hook

woocommerce_before_checkout_process
woocommerce_check_cart_items
API documentation generated by ApiGen