WordPress at Your Fingertips
function is not described

WC_Regenerate_Images_Request::is_regeneratable() protected WC 1.0

Determines whether an attachment can have its thumbnails regenerated.

Adapted from Regenerate Thumbnails by Alex Mills.

{} It's a method of the class: WC_Regenerate_Images_Request{}

No Hooks.

Return

true|false. Whether the given attachment can have its thumbnails regenerated.

Usage

// protected - for code of main (parent) or child class
$result = $this->is_regeneratable( $attachment );
$attachment(WP_Post) (required)
An attachment's post object.

Code of WC_Regenerate_Images_Request::is_regeneratable() WC 5.6.0

protected function is_regeneratable( $attachment ) {
	if ( 'site-icon' === get_post_meta( $attachment->ID, '_wp_attachment_context', true ) ) {
		return false;
	}

	if ( wp_attachment_is_image( $attachment ) ) {
		return true;
	}

	return false;
}