Bulk_Tier
Class Bulk_Tier Holds the information for a bulk tier.
Tags
Table of Contents
- $discount_amount : float
- $discount_type : string
- $max_quantity : int
- $min_quantity : int
- $product : WC_Product
- __construct() : mixed
- Bulk_Tier constructor.
- get_discount_amount() : float
- Get the discount amount.
- get_discount_type() : string
- Get the discount type.
- get_formatted_discount_amount() : string
- Get the discount amount formatted.
- get_max_quantity() : int
- Get the maximum quantity.
- get_min_quantity() : int
- Get the minimum quantity.
- get_price_per_item() : string
- Get the price per item based on the discount type and the tier quantity.
- get_product() : WC_Product
- Get the product.
- get_quantity_range() : string|int
- Get the quantity range.
Properties
$discount_amount
protected
float
$discount_amount
$discount_type
protected
string
$discount_type
$max_quantity
protected
int
$max_quantity
$min_quantity
protected
int
$min_quantity
$product
protected
WC_Product
$product
Methods
__construct()
Bulk_Tier constructor.
public
__construct(WC_Product $product, int $min_quantity, int $max_quantity, string $discount_type, string $discount_amount) : mixed
Parameters
- $product : WC_Product
-
The product.
- $min_quantity : int
-
The minimum quantity.
- $max_quantity : int
-
The maximum quantity.
- $discount_type : string
-
The discount type.
- $discount_amount : string
-
The discount amount.
Return values
mixed —get_discount_amount()
Get the discount amount.
public
get_discount_amount() : float
Return values
float —get_discount_type()
Get the discount type.
public
get_discount_type() : string
Return values
string —get_formatted_discount_amount()
Get the discount amount formatted.
public
get_formatted_discount_amount() : string
Return values
string —get_max_quantity()
Get the maximum quantity.
public
get_max_quantity() : int
Return values
int —get_min_quantity()
Get the minimum quantity.
public
get_min_quantity() : int
Return values
int —get_price_per_item()
Get the price per item based on the discount type and the tier quantity.
public
get_price_per_item() : string
Return values
string —get_product()
Get the product.
public
get_product() : WC_Product
Return values
WC_Product —get_quantity_range()
Get the quantity range.
public
get_quantity_range() : string|int