meta.php
Can add the following code to achieve
How should ACF get the file size?
<?php
global $product;
$downloads = $product->get_files();
foreach( $downloads as $key => $each_download ) {
$ProductID = attachment_url_to_postid( $each_download[“file”] );
$path = get_attached_file( $ProductID );
}
echo ‘<p> size: ‘. size_format(filesize($path)) .'</p>’;
?>