woocommerce_readfile_chunked

The WooCommerce woocommerce readfile chunked function.

Description

woocommerce_readfile_chunked( $file, (bool) $retbytes = true ); 

Parameters (2)

0. $file
The file.
1. $retbytes — Optional. (bool) => true
The retbytes.

Usage

  1. if ( !function_exists( 'woocommerce_readfile_chunked' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The file. 
  5. $file = null; 
  6.  
  7. // The retbytes. 
  8. $retbytes = true; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = woocommerce_readfile_chunked($file, $retbytes); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-deprecated-functions.php  
  1. function woocommerce_readfile_chunked( $file, $retbytes = true ) { 
  2. wc_deprecated_function( 'woocommerce_readfile_chunked', '2.1', 'WC_Download_Handler::readfile_chunked()' ); 
  3. return WC_Download_Handler::readfile_chunked( $file );