Automattic\WooCommerce\Internal\ProductFeed\Storage

JsonFileFeed::endpublicWC 1.0

End the feed.

Method of the class: JsonFileFeed{}

No Hooks.

Returns

null. Nothing (null).

Usage

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

JsonFileFeed::end() code WC 10.7.0

public function end(): void {
	if ( ! is_resource( $this->file_handle ) ) {
		return;
	}

	// Close the array and the file.
	fwrite( $this->file_handle, ']' );
	fclose( $this->file_handle );

	// Indicate that we have a complete file.
	$this->file_completed = true;
}