Automattic\WooCommerce\Internal\ProductFeed\Storage

JsonFileFeed::delete │ public │ WC 1.0

{@inheritDoc}

Method of the class: JsonFileFeed{}

No Hooks.

Returns

void. Nothing (null).

Usage

$JsonFileFeed = new JsonFileFeed();
$JsonFileFeed->delete( $identifier ): void;
$identifier(string) (required)
The identifier returned by open().

JsonFileFeed::delete() code WC 11.1.2

public function delete( string $identifier ): void {
	// Never turn an identifier that is actually a path into a delete outside the feed directory.
	if ( ! $this->is_valid_feed_identifier( $identifier ) ) {
		return;
	}

	$path = $this->feed_file_path( $identifier );
	if ( is_file( $path ) ) {
		wp_delete_file( $path );
	}
}