Automattic\WooCommerce\Admin\Features\ProductBlockEditor
ProductTemplate::to_json
Get the product template as JSON like.
Method of the class: ProductTemplate{}
No Hooks.
Returns
Array. The JSON.
Usage
$ProductTemplate = new ProductTemplate(); $ProductTemplate->to_json();
ProductTemplate::to_json() ProductTemplate::to json code WC 10.4.3
public function to_json() {
return array(
'id' => $this->get_id(),
'title' => $this->get_title(),
'description' => $this->get_description(),
'icon' => $this->get_icon(),
'order' => $this->get_order(),
'layoutTemplateId' => $this->get_layout_template_id(),
'productData' => $this->get_product_data(),
'isSelectableByUser' => $this->get_is_selectable_by_user(),
);
}