Product Import Export plugin gives provision to automatically import products to your online store at the scheduled time with the specified time interval. You can even import products from multiple CSV files at once without having the need to import each file one by one at a time.
With the Product Import Export Plugin for WooCommerce and the below code snippet added to the function.php file of the active child theme, you can import multiple CSV files residing in your FTP server.
To cron import multiple CSV files all at once, do the following:
- Navigate to WooCommerce > Product Im-Ex > Settings
- Enable FTP and enter the following FTP details:
- Enter FTP Server Host/IP.
- Enter FTP User Name.
- Enter FTP Password.
- Select Use FTPS checkbox to connect securely.
- Test FTP if working properly
- Enable passive mode if required.
- Choose Enabled option to automatically Import products from FTP Server Host/IP, as shown below:
- Enter the complete path of the root directory where the CSV files are residing in the Import File field. All the CSV files in the specified directory will be imported.
Note: The cron importing procedure of multiple CSV files is done in a similar manner as to how normal cron is done, however, while entering the import file path, specify the directory path. That is, in normal cases the directory path along with the CSV file name have to be entered but in this case, since multiple CSVs are to be imported, you will just have to enter the directory path. For example, if the CSV files are contained within FolderA/FloderB then, all files contained in FolderB will be imported into your store.
- Enter the required Start time for importing the products.
- Enter the time interval in minutes for importing the products.
- Select Merge Products if exist checkbox to merge existing product with the updated details of the same product. The Merging of the product is possible only if the product ID already exists in your online store. Otherwise, the product is imported as a new product.
- Skip new product: If a new product SKU is encountered in the imported CSV file, it will be skipped, and only the existing products will be updated.
- Delete existing products: check to delete existing products that are not present in the CSV.
- Use SKU to link grouped products: Check this to link grouped products using product SKUs instead of product IDs
- Select a required mapping file from the given drop-down list.
- Click Save Settings to save/update settings.
You can see that products are auto-imported using multiple CSV files from the FTP server to your online store.
Refer to Setting Up Cron Job – WooCommerce Product Import Export plugin to know how to set up cron for import.