Variation_Prices implements Registerable
Provides functionality for the Variation Prices plugin.
Interfaces, Classes and Traits
- Registerable
Table of Contents
- $price_range_handler : Price_Range
- The price range handler.
- $products_handler : Products
- The products handler.
- get_sale_price_html() : string
- Get the sale price HTML for a variable product in the list format.
- register() : mixed
- get_list_format_html() : string
- Render the sale price HTML for a variable product in the list format.
Properties
$price_range_handler
The price range handler.
private
Price_Range
$price_range_handler
$products_handler
The products handler.
private
Products
$products_handler
Methods
get_sale_price_html()
Get the sale price HTML for a variable product in the list format.
public
get_sale_price_html(string $html, WC_Product $product, Discount $discount, WC_Product $reduced_product) : string
Parameters
- $html : string
-
The sale price HTML.
- $product : WC_Product
-
The product.
- $discount : Discount
-
The discount.
- $reduced_product : WC_Product
-
The reduced product.
Return values
string —The sale price HTML.
register()
public
register() : mixed
Tags
Return values
mixed —get_list_format_html()
Render the sale price HTML for a variable product in the list format.
private
get_list_format_html(WC_Product $product, Discount $discount, WC_Product $reduced_product) : string
Parameters
- $product : WC_Product
-
The product.
- $discount : Discount
-
The discount.
- $reduced_product : WC_Product
-
The reduced product.
Return values
string —The sale price HTML.