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.

This commit is contained in:
Gerhard Potgieter 2017-10-02 08:37:07 +02:00
parent 7e9e58d75f
commit a4332486c8
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) );