WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Regenerate_Images::image_size_matches_settings() protected WC 1.0

See if an image's dimensions match actual settings.

Это метод класса: WC_Regenerate_Images{}

Хуков нет.

Возвращает

true/false. True if they match. False if they do not (may trigger regen).

Использование

$result = WC_Regenerate_Images::image_size_matches_settings( $image, $size );
$image(массив) (обязательный)
Image dimensions array.
$size(строка) (обязательный)
Named size.

Код WC Regenerate Images::image size matches settings: woocommerce/includes/class-wc-regenerate-images.php WC 4.5.2

<?php
protected static function image_size_matches_settings( $image, $size ) {
	$target_size = wc_get_image_size( $size );
	$uncropped   = '' === $target_size['width'] || '' === $target_size['height'];

	if ( ! $uncropped ) {
		$ratio_match = wp_image_matches_ratio( $image['width'], $image['height'], $target_size['width'], $target_size['height'] );

		// Size is invalid if the widths or crop setting don't match.
		if ( $ratio_match && $target_size['width'] !== $image['width'] ) {
			return false;
		}

		// Size is invalid if the heights don't match.
		if ( $ratio_match && $target_size['height'] && $target_size['height'] !== $image['height'] ) {
			return false;
		}
	}

	// If cropping mode has changed, regenerate the image.
	if ( $uncropped && empty( $image['uncropped'] ) ) {
		return false;
	}

	return true;
}