From 88d506bac01be521e5b107bb0c1c854259e35c88 Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Fri, 31 Aug 2018 12:24:55 -0700 Subject: [PATCH] Dont do abspath file_exists check on urls that start with // since those are remote urls and not local urls --- includes/class-wc-download-handler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-download-handler.php b/includes/class-wc-download-handler.php index 8b1af51fe81..e39a466bc70 100644 --- a/includes/class-wc-download-handler.php +++ b/includes/class-wc-download-handler.php @@ -244,7 +244,7 @@ class WC_Download_Handler { $remote_file = true; // See if path needs an abspath prepended to work. - if ( file_exists( ABSPATH . $file_path ) ) { + if ( '//' !== substr( $file_path, 0, 2 ) && file_exists( ABSPATH . $file_path ) ) { $remote_file = false; $file_path = ABSPATH . $file_path;