Add_To_Cart implements Registerable, Premium_Service

Add to Cart Handler

Tags
author

Barn2 Plugins info@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Premium_Service

Table of Contents

handle_validation()  : bool
Handles validation on add to cart.
register()  : mixed
{@inheritdoc}

Methods

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

A test cart is cloned to determine which rules the product would break if it is added to the cart.

Parameters
$passed : bool
$product_id : int
$quantity : int
$variation_id : int|null = null
$variation : WC_Product_Variation = null
Tags
Return values
bool

$passed

register()

{@inheritdoc}

public register() : mixed
Tags
Return values
mixed

Search results