Default_Quantity extends Abstract_Rule

Default Quantity

Tags
author

Barn2 Plugins info@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Table of Contents

$product  : mixed
$category_id  : mixed
$category_value  : mixed
$data_key  : mixed
$global_value  : mixed
$product_value  : mixed
$rule_level  : mixed
$rule_value  : mixed
$sanitize_cb  : mixed
$type  : mixed
$user_role_scope  : mixed
$variable_value  : mixed
$variation_value  : mixed
__construct()  : mixed
Constructor.
calculate_rules()  : mixed
Calculate and set the rule value
check_cart_validation()  : bool
Check the qualifying total meets the rule conditions,
get_cart_validation()  : Cart_Validation|false
Get a Cart_Validation object.
get_category_id()  : int|null
Get the category id
get_category_value()  : mixed
Retrieves and sets the meta value at the category level
get_data_key()  : string
Get the data key
get_global_value()  : mixed
Retrieves and sets the meta value at the global level
get_level()  : string|null
Returns the rule level
get_product_value()  : mixed
Retrieves and sets the meta value at the product (simple) level
get_type()  : string
Get the type ID
get_value()  : mixed
Returns the calculated rule value based on the rule level
get_variable_value()  : mixed
Retrieves and sets the meta value at the variable level
get_variation_value()  : mixed
Retrieves and sets the meta value at the variation level
has_meta_value()  : bool
Determines if a given meta value is empty

Properties

$user_role_scope

protected mixed $user_role_scope = null
Tags

$variation_value

protected mixed $variation_value = null
Tags

Methods

__construct()

Constructor.

public __construct(WC_Product $product) : mixed
Parameters
$product : WC_Product
Tags
Return values
mixed

calculate_rules()

Calculate and set the rule value

public calculate_rules() : mixed
Tags
Return values
mixed

check_cart_validation()

Check the qualifying total meets the rule conditions,

public check_cart_validation(float $qualifying_total) : bool
Parameters
$qualifying_total : float
Tags
Return values
bool

get_cart_validation()

Get a Cart_Validation object.

public get_cart_validation(WC_Cart $cart, string $cart_item_key) : Cart_Validation|false
Parameters
$cart : WC_Cart
$cart_item_key : string
Tags
Return values
Cart_Validation|false

get_category_id()

Get the category id

public get_category_id() : int|null
Tags
Return values
int|null

get_category_value()

Retrieves and sets the meta value at the category level

public get_category_value() : mixed
Tags
Return values
mixed

get_data_key()

Get the data key

public get_data_key() : string
Tags
Return values
string

get_global_value()

Retrieves and sets the meta value at the global level

public get_global_value() : mixed
Tags
Return values
mixed

get_level()

Returns the rule level

public get_level() : string|null
Tags
Return values
string|null

get_product_value()

Retrieves and sets the meta value at the product (simple) level

public get_product_value() : mixed
Tags
Return values
mixed

get_type()

Get the type ID

public get_type() : string
Tags
Return values
string

get_value()

Returns the calculated rule value based on the rule level

public get_value() : mixed
Tags
Return values
mixed

get_variable_value()

Retrieves and sets the meta value at the variable level

public get_variable_value() : mixed
Tags
Return values
mixed

get_variation_value()

Retrieves and sets the meta value at the variation level

public get_variation_value() : mixed
Tags
Return values
mixed

has_meta_value()

Determines if a given meta value is empty

protected has_meta_value(mixed $value) : bool
Parameters
$value : mixed
Tags
Return values
bool

Search results