Skip to content

Instantly share code, notes, and snippets.

@wtmujeebu
Created November 25, 2021 04:52
Show Gist options
  • Save wtmujeebu/0ef6e1c128c0a235d88702e54c7a224d to your computer and use it in GitHub Desktop.
Save wtmujeebu/0ef6e1c128c0a235d88702e54c7a224d to your computer and use it in GitHub Desktop.
Import only the most recent file from FTP using Import export suite for WooCommerce by WebToffee
<?php // Do not copy this line.
add_filter('wt_iew_folder_import_fetched_files','wt_import_latest_file',10,3);
if(!function_exists('wt_import_latest_file')){
function wt_import_latest_file($server_csv_files,$ftp_conn,$remote_file){
rsort($server_csv_files);
return array($server_csv_files[0]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment