Automattic\WooCommerce\Internal\ProductFeed\Storage
JsonFileFeed::end
End the feed.
Method of the class: JsonFileFeed{}
No Hooks.
Returns
null. Nothing (null).
Usage
$JsonFileFeed = new JsonFileFeed(); $JsonFileFeed->end(): void;
JsonFileFeed::end() 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;
}