Automattic\WooCommerce\Internal\Admin\BlockTemplates

BlockTemplateLogger::template_events_to_json()publicWC 1.0

Get all template events for a given template as a JSON like array.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$BlockTemplateLogger = new BlockTemplateLogger();
$BlockTemplateLogger->template_events_to_json( $template_id ): array;
$template_id(строка) (обязательный)
Template ID.

Код BlockTemplateLogger::template_events_to_json() WC 9.7.1

public function template_events_to_json( string $template_id ): array {
	if ( ! isset( $this->all_template_events[ $template_id ] ) ) {
		return array();
	}

	$template_events = $this->all_template_events[ $template_id ];

	return $this->to_json( $template_events );
}