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_cart

Class bkap_cart

Class for all the operations when Cart is created or modified i.e. Add to cart or Cart update

Package: BKAP\Cart
Author: Tyche Softwares
Since: 1.7.0
Todo: Remove unnecessary global variable $wpdb
Todo: add description where $wpdb has been used and remove if needed
Located at cart.php

Methods summary

public static mixed
# bkap_add_cart_item( mixed $cart_item )

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

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

Parameters

$cart_item
Cart Item Array

Returns

mixed
Cart Item Array with modified data

Since

1.7.0

Globals

mixed $wpdb

Hook

woocommerce_add_cart_item
public static mixed
# bkap_add_cart_item_data( mixed $cart_item_meta, string|integer $product_id )

This function adds the booking details of the product when add to cart button is clicked.

This function adds the booking details of the product when add to cart button is clicked.

Parameters

$cart_item_meta
Cart Item Meta Object
$product_id
Product ID of the product added to cart

Returns

mixed
Cart Item Meta Object with Booking Array Added

Since

1.7.0
4.5.0 Compatibility with Bundles Product
4.7.0 Compatibility with Composite Products

Globals

mixed $wpdb

Hook

woocommerce_add_cart_item_data
public static mixed
# bkap_get_cart_item_from_session( mixed $cart_item, mixed $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 Object
$values
Cart Session Object

Returns

mixed
Cart Item Object

Since

1.7.0

Globals

mixed $wpdb

Hook

woocommerce_get_cart_item_from_session
public static mixed
# bkap_get_item_data_booking( mixed $other_data, mixed $cart_item )

This function displays the Booking details on cart page, checkout page in cart table

This function displays the Booking details on cart page, checkout page in cart table

Parameters

$other_data
Cart Meta Data Object
$cart_item
Session Cart Item Object

Returns

mixed
Cart Meta Data Object

Since

1.7.0

Globals

mixed $wpdb

Hook

woocommerce_get_item_data
public static array
# bkap_woo_cart_widget_subtotal( array $fragments )

This function modifies the product price in WooCommerce Cart Widget

This function modifies the product price in WooCommerce Cart Widget

Parameters

$fragments
WooCommerce Cart fragements that display data

Returns

array
Cart Fragments

Since

2.5.0

Globals

mixed $woocommerce

Hook

woocommerce_add_to_cart_fragments
API documentation generated by ApiGen