Hi,
I get an error when trying to import CSV files. I followed the documentation https://wpgeodirectory.com/docs-v2/geodirectory/settings/import-export/#not-a-valid-csv-file and used
function wp39550_disable_real_mime_check( $data, $file, $filename, $mimes ) {
$wp_filetype = wp_check_filetype( $filename, $mimes );
$ext = $wp_filetype[‘ext’];
$type = $wp_filetype[‘type’];
$proper_filename = $data[‘proper_filename’];
return compact( ‘ext’, ‘type’, ‘proper_filename’ );
}
add_filter( ‘wp_check_filetype_and_ext’, ‘wp39550_disable_real_mime_check’, 10, 4 );
in my code snippets but still get the error msg Array( [error] => Sorry, this file type is not permitted for security reasons.)
I didn’t use https://wordpress.org/plugins/disable-real-mime-check/ because it states that”this plugin… may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.”