WC_Regenerate_Images::unfiltered_image_downsize()private staticWC 1.0

Image downsize, without this classes filtering on the results.

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

Хуков нет.

Возвращает

Строку. New image URL.

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

$result = WC_Regenerate_Images::unfiltered_image_downsize( $attachment_id, $size );
$attachment_id(int) (обязательный)
Attachment ID.
$size(строка) (обязательный)
Size to downsize to.

Код WC_Regenerate_Images::unfiltered_image_downsize() WC 8.7.0

private static function unfiltered_image_downsize( $attachment_id, $size ) {
	remove_action( 'image_get_intermediate_size', array( __CLASS__, 'filter_image_get_intermediate_size' ), 10, 3 );

	$return = image_downsize( $attachment_id, $size );

	add_action( 'image_get_intermediate_size', array( __CLASS__, 'filter_image_get_intermediate_size' ), 10, 3 );

	return $return;
}