Automattic\WooCommerce\Internal\Admin\BlockTemplates

BlockTemplateLogger::has_template_events_changedprivateWC 1.0

Has the template events changed since the last time they were logged?

Method of the class: BlockTemplateLogger{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->has_template_events_changed( $template_id, $events_hash );
$template_id(string) (required)
Template ID.
$events_hash(string) (required)
Events hash.

BlockTemplateLogger::has_template_events_changed() code WC 10.7.0

private function has_template_events_changed( string $template_id, string $events_hash ) {
	$previous_hash = get_transient( self::LOG_HASH_TRANSIENT_BASE_NAME . $template_id );

	return $previous_hash !== $events_hash;
}