Automattic\WooCommerce\Internal\Caches

ProductTransientsDeferrer::stop_deferring │ public │ WC 1.0

Stop deferring product transient deletions.

When the outermost deferral ends, all collected product IDs are flushed.

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

Хуков нет.

Возвращает

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

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

$ProductTransientsDeferrer = new ProductTransientsDeferrer();
$ProductTransientsDeferrer->stop_deferring(): void;

Код ProductTransientsDeferrer::stop_deferring() WC 11.2.2

public function stop_deferring(): void {
	if ( 0 === $this->deferral_level ) {
		return;
	}

	--$this->deferral_level;
	if ( 0 === $this->deferral_level ) {
		remove_action( 'shutdown', array( $this, 'handle_shutdown' ), self::SHUTDOWN_HOOK_PRIORITY );
		$this->flush();
	}
}