From a4332486c83ce219c9d5aca131dfa5598eef1291 Mon Sep 17 00:00:00 2001 From: Gerhard Potgieter Date: Mon, 2 Oct 2017 08:37:07 +0200 Subject: [PATCH] pass false to create param of wp_upload_dir, we only need the location, do not want the folder to be created. This fixes warnings on read-only filesystems. --- includes/class-woocommerce.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-woocommerce.php b/includes/class-woocommerce.php index 2e14dda15f8..80cdc068f0b 100644 --- a/includes/class-woocommerce.php +++ b/includes/class-woocommerce.php @@ -202,7 +202,7 @@ final class WooCommerce { * Define WC Constants. */ private function define_constants() { - $upload_dir = wp_upload_dir(); + $upload_dir = wp_upload_dir( null, false ); $this->define( 'WC_ABSPATH', dirname( WC_PLUGIN_FILE ) . '/' ); $this->define( 'WC_PLUGIN_BASENAME', plugin_basename( WC_PLUGIN_FILE ) );