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

Packages

  • BKAP
    • Addons
    • Admin-Bookings
    • Attribute-Lockout
    • Block-Pricing
    • Booking-Box
    • Booking-Confirmation
    • Booking-Process
    • Cancel-Order
    • Cart
    • Checkout-Process
    • Core
    • Date-Time
    • Emails
    • Functions
    • Global-Function
    • Global-Settings
    • Google-Calendar-Sync
    • ICS
    • Import-Booking
    • Labels
    • License
    • Menus
    • Meta-Boxes
    • Reschedule
    • Resources
    • Search-Widget
    • Special-Price
    • Uninstall
    • Validation
    • Variation-Lockout
    • Vendors
      • Dokan
      • WC-Vendors
    • View-Bookings
  • None

Classes

  • bkap_validation

Class bkap_validation

Class for Handling Validation on Product, Cart and Checkout page

Package: BKAP\Validation
Author: Tyche Softwares
Class: bkap_validation
Located at validation.php

Methods summary

public static string
# bkap_get_validate_add_cart_item( string $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
Quantity selected when adding product to cart

Returns

string
$passed Returns true if allowed to add to cart else false if not.

Since

2.0

Hook

woocommerce_add_to_cart_validation
public static boolean
# bkap_get_bundle_item_validations( string|integer $product_id, WC_Product $product )

This functions Validate Bundle Products

This functions Validate Bundle Products

Parameters

$product_id
Product ID
$product
Product Object

Returns

boolean
true for available and false for locked out

Since

4.2
public static
# bkap_validate_overlap_time_cart( integer $product_id, array $post, string $check_in_date, string $from_time_slot, string $to_time_slot )

This function checks the overlapping timeslot for the selected date and timeslots when the product is added to cart.

This function checks the overlapping timeslot for the selected date and timeslots when the product is added to cart.

If the overlapped timeslot is already in cart and availability is less then selected bookinng date and timeslot then it will retun and array which contains the overlapped date and timeslot present in the cart

Parameters

$product_id
Product ID
$post
$_POST
$check_in_date
Date
$from_time_slot
From Time
$to_time_slot
To Time

Returns


$pass_fail_result_array Array contains overlapped start date and timeslot present in cart.

Since

4.4.0
public static Array
# bkap_get_quantity( integer $post_id, integer $bundle_child_qty = '' )

This function checks the availabilty for the selected date and timeslots 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.

This function checks the availabilty for the selected date and timeslots 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 Product ID
$bundle_child_qty
Bundle Child Quantity

Returns

Array
$pass_fail_result_array Array contains overlapped start date and timeslot present in cart.

Since

4.4.0
public static
# bkap_quantity_check( )

This function checks availability for date and time slot on the cart page when quantity on cart page is changed.

This function checks availability for date and time slot on the cart page when quantity on cart page is changed.

Since

2.0

Hook

woocommerce_before_checkout_process
public static
# remove_product_from_cart( )

This function will remove the product from cart when date and/or time is passed.

This function will remove the product from cart when date and/or time is passed.

Since

2.5.3

Hook

woocommerce_check_cart_items
woocommerce_before_checkout_process
API documentation generated by ApiGen