Where to insert code to change the upload folder on Wordpress?

Friends, tell me in what file to insert code to change directory of upload files?
The problem, in the same folder (month of January) loaded 90000 is too much. Want to break dates. Uploading files via Wp All Import.
Received from the developers Council. But I'm not a programmer. How to use it?

"If you mean that you want to import images to a different folder, you would need to write some custom PHP code tied to the upload_dir WordPress hook. Here's a basic example where we added a date to the folder:

add_filter('upload_dir', 'add_date_to_upload_dir');

add_date_to_upload_dir function( $param ) {
$date = date('d');
$dir = '/' . $date;
$param['path'] = $param['path'] . $dir;
$param['url'] = $param['url'] . $dir;
return $param;
}
"
August 23rd 19 at 11:01
1 answer
August 23rd 19 at 11:03
Solution
at the end of the file functions.php in the folder /wp-content/themes/Washam/

Find more questions by tags WooCommerceWordPress