Snippets

Visser Labs Override the temporary files directory for your hosting server

Created by Michael Visser last modified
<?php
function custom_woo_ce_sys_get_temp_dir() {

	// This is the full path to the new temp directory
	$path = ABSPATH . 'tmp'; // This is a sample path using the WordPress ABSPATH Constant
	// $path = 'PATH_TO_TMP_DIRECTORY';

	// ini_set() adds a new PHP configuration value informing PHPExcel of the new temp directory
	ini_set( 'upload_tmp_dir', $path );
	return $path;

}
add_filter( 'woo_ce_sys_get_temp_dir', 'custom_woo_ce_sys_get_temp_dir' );
?>

Comments (0)