adding filter comments
This commit is contained in:
parent
9d9b7464d7
commit
4624ab7dde
|
@ -277,6 +277,13 @@ class WC_Download_Handler {
|
|||
// Paths that begin with '//' are always remote URLs.
|
||||
if ( '//' === substr( $file_path, 0, 2 ) ) {
|
||||
$file_path = ( is_ssl() ? 'https:' : 'http:' ) . $file_path;
|
||||
|
||||
/**
|
||||
* Filter the remote filepath for download.
|
||||
*
|
||||
* @since 6.5.0
|
||||
* @param string $file_path File path.
|
||||
*/
|
||||
return array(
|
||||
'remote_file' => true,
|
||||
'file_path' => apply_filters( 'woocommerce_download_parse_remote_file_path', $file_path ),
|
||||
|
@ -297,7 +304,14 @@ class WC_Download_Handler {
|
|||
$remote_file = false;
|
||||
$file_path = $parsed_file_path['path'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Filter the filepath for download.
|
||||
*
|
||||
* @since 6.5.0
|
||||
* @param string $file_path File path.
|
||||
* @param bool $remote_file Remote File Indicator.
|
||||
*/
|
||||
return array(
|
||||
'remote_file' => $remote_file,
|
||||
'file_path' => apply_filters( 'woocommerce_download_parse_file_path', $file_path, $remote_file )
|
||||
|
|
Loading…
Reference in New Issue