Guest User

Untitled

a guest
Jan 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2. if ( ! empty( $downloadable_files ) ) {
  3. foreach ( $downloadable_files as $files ) {
  4. foreach ( $files as $file ) {
  5.  
  6. $downloads = $product->get_files();
  7. foreach( $downloads as $key => $each_download ) {
  8.  
  9. $path = str_replace( site_url('/'), ABSPATH, esc_url($each_download["file"]) );
  10.  
  11. if (!empty($file['name'])) {
  12. echo '<li class="nitro-line"><i class="fa fa-file-text-o mgr10"></i>'.esc_html($file['name'] ).'&nbsp;&nbsp;-&nbsp;&nbsp;'.size_format(filesize($path)).'</li>';
  13. }
  14.  
  15. }
  16. }
  17. }
  18. }
  19. ?>
  20.  
  21. example.zip - 50MB
Add Comment
Please, Sign In to add comment