Automattic\WooCommerce\Internal\ProductFeed\Storage

JsonFileFeed::flushpublicWC 1.0

{@inheritDoc}

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

Хуков нет.

Возвращает

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

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

$JsonFileFeed = new JsonFileFeed();
$JsonFileFeed->flush(): void;

Код JsonFileFeed::flush() WC 11.0.1

public function flush(): void {
	if ( is_resource( $this->file_handle ) ) {
		// Rely on fclose() to release the lock: it flushes the userspace buffer first and only then
		// unlocks, so the lock stays held until the buffered bytes are durable. An explicit LOCK_UN
		// here would release it while pending bytes are still buffered (see end()).
		fclose( $this->file_handle );
		$this->file_handle = null;
	}
}