Single_Product implements Registerable, Standard_Service

Class to display the product options on the single product page.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

Registerable
Standard_Service

Table of Contents

add_body_class()  : array<string|int, mixed>
Adds a body class to the single product page if there are fields.
add_image_button_images()  : mixed
Adds image button images to the product gallery.
add_suffix_to_price_html()  : string
Filters the price HTML to add the per product suffix if it exists.
output_options()  : mixed
Outputs the options on the single product page.
output_totals_container()  : mixed
Options price totals container.
register()  : mixed
{@inheritdoc}

Methods

add_body_class()

Adds a body class to the single product page if there are fields.

public add_body_class(array<string|int, mixed> $classes) : array<string|int, mixed>
Parameters
$classes : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>

add_image_button_images()

Adds image button images to the product gallery.

public add_image_button_images(array<string|int, mixed> $image_ids, WC_Product $product) : mixed
Parameters
$image_ids : array<string|int, mixed>
$product : WC_Product
Tags
Return values
mixed

add_suffix_to_price_html()

Filters the price HTML to add the per product suffix if it exists.

public add_suffix_to_price_html(string $price_html, WC_Product $product) : string
Parameters
$price_html : string

The price HTML.

$product : WC_Product

The product.

Tags
Return values
string

The filtered price HTML.

output_options()

Outputs the options on the single product page.

public output_options() : mixed
Tags
Return values
mixed

output_totals_container()

Options price totals container.

public output_totals_container() : mixed
Tags
Return values
mixed

register()

{@inheritdoc}

public register() : mixed
Tags
Return values
mixed

Search results