Product_Table implements Standard_Service, Registerable
Handles the WooCommerce Product Table integration.
Tags
Interfaces, Classes and Traits
- Standard_Service
- Registerable
Table of Contents
- before_multi_add_to_cart() : mixed
- Add custom handlers item_data and validaiton for multi add to cart.
- cart_item_data_wrapper() : array<string|int, mixed>
- Add product options data to item inside the cart.
- handle_validation() : bool
- Handles validation on add to cart.
- load_scripts() : mixed
- Load frontend scripts.
- multi_add_to_cart_data() : array<string|int, mixed>
- Set multi add to cart data.
- register() : mixed
- Register the integrations for WPT.
Methods
before_multi_add_to_cart()
Add custom handlers item_data and validaiton for multi add to cart.
public
before_multi_add_to_cart() : mixed
Tags
Return values
mixed —cart_item_data_wrapper()
Add product options data to item inside the cart.
public
cart_item_data_wrapper(array<string|int, mixed> $cart_item_data, int $product_id, int $variation_id, int $quantity) : array<string|int, mixed>
Parameters
- $cart_item_data : array<string|int, mixed>
- $product_id : int
- $variation_id : int
- $quantity : int
Tags
Return values
array<string|int, mixed> —handle_validation()
Handles validation on add to cart.
public
handle_validation(bool $passed, int $product_id, int $quantity[, int|null $variation_id = null ][, WC_Product_Variation $variation = null ]) : bool
Parameters
- $passed : bool
- $product_id : int
- $quantity : int
- $variation_id : int|null = null
- $variation : WC_Product_Variation = null
Tags
Return values
bool —$passed
load_scripts()
Load frontend scripts.
public
load_scripts(Table_Args $args) : mixed
Parameters
- $args : Table_Args
Tags
Return values
mixed —multi_add_to_cart_data()
Set multi add to cart data.
public
multi_add_to_cart_data(array<string|int, mixed> $data, WC_Product $product) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
- $product : WC_Product
Tags
Return values
array<string|int, mixed> —register()
Register the integrations for WPT.
public
register() : mixed