adding woocommerce_download_parse_file_path filter
This commit is contained in:
parent
b27618e51d
commit
17b18ac68f
|
@ -276,9 +276,10 @@ class WC_Download_Handler {
|
||||||
|
|
||||||
// Paths that begin with '//' are always remote URLs.
|
// Paths that begin with '//' are always remote URLs.
|
||||||
if ( '//' === substr( $file_path, 0, 2 ) ) {
|
if ( '//' === substr( $file_path, 0, 2 ) ) {
|
||||||
|
$file_path = (is_ssl() ? 'https:' : 'http:') . $file_path;
|
||||||
return array(
|
return array(
|
||||||
'remote_file' => true,
|
'remote_file' => true,
|
||||||
'file_path' => is_ssl() ? 'https:' . $file_path : 'http:' . $file_path,
|
'file_path' => apply_filters( 'woocommerce_download_parse_file_path', $file_path, true ),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +300,7 @@ class WC_Download_Handler {
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'remote_file' => $remote_file,
|
'remote_file' => $remote_file,
|
||||||
'file_path' => $file_path,
|
'file_path' => apply_filters( 'woocommerce_download_parse_file_path', $file_path, $remote_file )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue