WordPress at Your Fingertips
function is not described

WC_Regenerate_Images::add_uncropped_metadata() public WC 1.0

We need to track if uncropped was on or off when generating the images.

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

No Hooks.

Return

Array.

Usage

$result = WC_Regenerate_Images::add_uncropped_metadata( $meta_data );
$meta_data(array) (required)
Array of meta data.

Code of WC_Regenerate_Images::add_uncropped_metadata() WC 5.9.0

public static function add_uncropped_metadata( $meta_data ) {
	$size_data = wc_get_image_size( 'woocommerce_thumbnail' );
	if ( isset( $meta_data['sizes'], $meta_data['sizes']['woocommerce_thumbnail'] ) ) {
		$meta_data['sizes']['woocommerce_thumbnail']['uncropped'] = empty( $size_data['height'] );
	}
	return $meta_data;
}