Automattic\WooCommerce\Internal\Admin\BlockTemplates

AbstractBlockTemplate::to_json()publicWC 1.0

Get the template as JSON like array.

Метод класса: AbstractBlockTemplate{}

Хуков нет.

Возвращает

Массив. The JSON.

Использование

$AbstractBlockTemplate = new AbstractBlockTemplate();
$AbstractBlockTemplate->to_json(): array;

Код AbstractBlockTemplate::to_json() WC 9.7.1

public function to_json(): array {
	return array(
		'id'             => $this->get_id(),
		'title'          => $this->get_title(),
		'description'    => $this->get_description(),
		'area'           => $this->get_area(),
		'blockTemplates' => $this->get_formatted_template(),
	);
}