Synchronization
Note: From version 2.5, Sales Layer WooCommerce plugin synchronizations will work with pagination to improve its performance. Therefore, it is strongly recommended to update this plugin.
In the General Parameters section the next options will be configurable:
-
API version: Version of the Sales Layer API that will be used in synchronizations. Pagination can only be used with the 1.18 version.
-
Number of pagination items: When calling to Sales Layer API, batches of items with the number set will be provided, and after data analysis, stored in internal tables to be processed.
-
Debug level logging: The highest level you set, the more info the process writes. This will affect the process performance while synchronizing.

The channel receives the information and stores it temporarily in the database, to be progressively processed. To track if there is still info to be processed, it is possible to enter the section Connectors.

When you press the Synchronize button over your connector, if there are registers to be processed, you will find a progress bar with the pending items and total quantity:

If an error has occurred during the synchronization process, the system will try two times more. The errors will be saved in a document inside the plugin folder, under the subfolder logs, and once the synchronization is over it will show a warning message.
- The first time a new item is synchronized, it will look among the existing items that have no Sales Layer credentials (company ID, product ID, and format ID if applicable for variants). In case it doesn’t find any, it will be created.
- If it is a category, it will look for it by its name.
- If it is a product, it will look for the SKU first, and in case it doesn’t find it, it will look for the name.
- Finally, variants will be searched by attributes that are equal to the variant to be synchronized.
Warning: The items’ SKUs are unique, they can’t be repeated. If there are different items with the same SKU it will show an error message in the log.
Note: you can see how to activate logs in the Feedback after synchronization > Managing errors section.
How to synchronize by cron
To activate the auto synchronization mode and synchronize data, it is necessary to activate the cron jobs in the server.
You can add or create cron jobs from the next commands in your console (replacing or path):
- * * * * * wget -q -O - https://yourdomain.com/wp-cron.php
- * * * * * php -q -f /path/to/your/woocommerce/root/directory/wp-cron.php
Note: Remember to replace yourdomain.com for your current domain or /path/to/your/WooCommerce/root/directory for your WooCommerce path.