WooCommerce Code Reference

ProductTemplate
in package

The Product Template that represents the relation between the Product and the LayoutTemplate (ProductFormTemplateInterface)

Tags
see
ProductFormTemplateInterface
deprecated
10.9.0

Product editor extension APIs will be removed in WooCommerce 11.0.

Table of Contents

$description  : string
The template description.
$icon  : string
The template icon.
$id  : string
The template id.
$is_selectable_by_user  : bool
If the template is directly selectable through the UI.
$layout_template_id  : string
The layout template id.
$order  : int
The template order.
$product_data  : array<string|int, mixed>
The product data.
$title  : string
The template title.
__construct()  : mixed
ProductTemplate constructor
get_description()  : string
Get the template description.
get_icon()  : string
Get the template icon.
get_id()  : string
Get the template ID.
get_is_selectable_by_user()  : bool
Get the selectable attribute.
get_layout_template_id()  : string
Get the layout template ID.
get_order()  : int
Get the template order.
get_product_data()  : array<string|int, mixed>
Get the product data.
get_title()  : string
Get the template title.
set_description()  : mixed
Set the template description.
set_icon()  : mixed
Set the template icon.
set_layout_template_id()  : mixed
Set the layout template ID.
set_order()  : mixed
Set the template order.
to_json()  : array<string|int, mixed>
Get the product template as JSON like.

Properties

Methods