WordPress at Your Fingertips
function is not described

WC_Regenerate_Images::get_full_size_image_dimensions() private WC 1.0

Get full size image dimensions.

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

No Hooks.

Return

Array. Width and height. Empty array if the dimensions cannot be found.

Usage

$result = WC_Regenerate_Images::get_full_size_image_dimensions( $attachment_id );
$attachment_id(int) (required)
Attachment ID of image.

Code of WC_Regenerate_Images::get_full_size_image_dimensions() WC 5.9.0

private static function get_full_size_image_dimensions( $attachment_id ) {
	$imagedata = wp_get_attachment_metadata( $attachment_id );

	if ( ! $imagedata ) {
		return array();
	}

	if ( ! isset( $imagedata['file'] ) && isset( $imagedata['sizes']['full'] ) ) {
		$imagedata['height'] = $imagedata['sizes']['full']['height'];
		$imagedata['width']  = $imagedata['sizes']['full']['width'];
	}

	return array(
		'width'  => $imagedata['width'],
		'height' => $imagedata['height'],
	);
}