Automattic\WooCommerce\Internal\Admin\BlockTemplates
BlockTemplateLogger::template_events_to_json
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() BlockTemplateLogger::template events to json WC 10.5.2
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 );
}