Notice_Helper
Quantity Step
Tags
Table of Contents
- get_add_to_cart_notice() : string
- Get an add to cart error notice based on a validation object.
- get_cart_notice() : string
- Get the cart error notice based on a validation object.
- get_add_to_cart_value_string() : string
- Gets the add to cart message value string
- get_comparison_string() : string
- Gets the comparison string for the error message
- get_object_name() : string
- Gets the appropriate object name for an error message
- get_quantity_comparison_string() : string
- Gets the quantity comparison string for quantity rules
- get_unit_string() : string
- Gets the unit string for the rule level
- get_value_comparison_string() : string
- Gets the value comparison string for value rules
Methods
get_add_to_cart_notice()
Get an add to cart error notice based on a validation object.
public
static get_add_to_cart_notice(Cart_Validation $validation) : string
Parameters
- $validation : Cart_Validation
Tags
Return values
string —get_cart_notice()
Get the cart error notice based on a validation object.
public
static get_cart_notice(Cart_Validation $validation) : string
Parameters
- $validation : Cart_Validation
Tags
Return values
string —get_add_to_cart_value_string()
Gets the add to cart message value string
private
static get_add_to_cart_value_string(Cart_Validation $validation) : string
Parameters
- $validation : Cart_Validation
Tags
Return values
string —get_comparison_string()
Gets the comparison string for the error message
private
static get_comparison_string(Cart_Validation $validation) : string
Parameters
- $validation : Cart_Validation
Tags
Return values
string —get_object_name()
Gets the appropriate object name for an error message
private
static get_object_name(Cart_Validation $validation) : string
Parameters
- $validation : Cart_Validation
Tags
Return values
string —get_quantity_comparison_string()
Gets the quantity comparison string for quantity rules
private
static get_quantity_comparison_string(string $rule_level, mixed $rule_value) : string
Parameters
- $rule_level : string
- $rule_value : mixed
Tags
Return values
string —get_unit_string()
Gets the unit string for the rule level
private
static get_unit_string(string $rule_level) : string
Parameters
- $rule_level : string
Tags
Return values
string —get_value_comparison_string()
Gets the value comparison string for value rules
private
static get_value_comparison_string(array<string|int, mixed> $rule_value) : string
Parameters
- $rule_value : array<string|int, mixed>