Last active
October 29, 2021 11:29
-
-
Save wtmujeebu/30d9ecc1adb538348139246a25a64289 to your computer and use it in GitHub Desktop.
WooCommerce product import by WebToffee compatibility with - File Renaming on Upload plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // Do not copy this line | |
add_filter('sanitize_file_name', 'sanitize_file_name_wt', 99999, 2); | |
function sanitize_file_name_wt($filename, $filename_raw) { | |
if (strpos($filename, 'temp_') !== false) { | |
return $filename_raw; | |
} | |
return $filename; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment