Xeroom Version 3.1.1 – Release notes – 2nd August 2024
Enhancements:
1. Set invoice due date to a specific day of the month - Useful for payments on account. This is in addition to the existing custom due date where you can add extra days to the Xero default setting of 3 days. In the case of February it will use 28th if the specific day is set to be >29th.
2. Global Inventory Synch - The synch was not cycling through all the batches due to changes in WooCommerce that meant only the first batch ran. This has been fixed and improved with batches processed at the rate of one/minute and progress is also shown for the Synch Now button. Log files are generated for each batch.
The max batch size supported by the Xero API is 500, but they recommend it be set between 50 and 100 entries. We recommend that you try 500 to start with and if it does not show or synch all of the products reliably (by checking the log files) try reducing the batch size down to 200 then 100 etc.
This is how it works:
- Depending on the number of products to be sent and the batch size, it will calculate the number of batches to be sent.
- Cron jobs will be created to send each batch at the rate of one/minute.
- After all the batches are sent, the process repeats depending on the user schedule selection: 5 minutes, hourly, daily.
** For further info on how cron jobs work and managing them see the note further down.
3. Global Product Synch – This was not synching some of the products that were ticked on the product data tab.
**For detailed info on how to bulk load these settings see below.
4. Global Product Synch Set Batch Size - We have added the same batch size options that are in Global Inventory Synch to this now. This works exactly the same way too with feedback to the use of what batch no is running in the case of synch now.
5. Improved log files - The log filenames have been shortened and a batch number suffix added to each one for each run so it is easy to check that the synch is happening correctly and for all batches.
The Product Synch log file now shows what the new values that have been changed to are for each product:
6. Filter products that are synched – In the WooCommerce All Products page we have added a filter to show the ones that are synched with Xero.
7. Xeroom Circuit Breaker – One of our customers had a bad experience when turning on the HPOS in WooCommerce which resulted in some errors and thousands of old orders being resent along with credit notes for each. Whilst a great stress test of Xeroom since there is no easy way to bulk delete invoices in Xero this was a pain to clean up. As a result, we have implemented a circuit breaker that will restrict the total no of invoices and credit notes that can be created per day to 50. There is a Xeroom setting that permits this to be increased. If you hit the limit you will get an error message that will also show in Xeroom debug.
Bug fixes:
1. Bulk resend status bar was not showing on some sites.
2. Stripe fees are now passed gross to match the payment and avoid tax being added again which was left unpaid in the Stripe Fee bill.
Xeroom Synch Cron Job Troubleshooting
Xeroom uses the cron job system in WordPress to perform the synchronisations. Xeroom now enables you to test that it is working and log files are created, which show under the Xeroom/log files menu item. If these are not there and the batches are not running or running at weird intervals then check your cron system and if necessary, disable your WordPress cron and enable a server based cron to run ideally every minute (but beware of large jobs that your system runs such as Updraft backups that won’t complete in a min and can lead to starving the resources so do fully test).
For scheduled synchs running under cron the batches are processed at the same rate as the cron time interval, eg if cron is set to run every 5 mins and synch is hourly with say 3 batches then it will run the first batch each hour, then 5 mins later the next batch and so on.
You can install a cron manager or scheduling plugin, there are lots and WP Control is a good one that shows both events and schedules.
For further info please see https://developer.wordpress.org/plugins/cron/ and https://www.wpeditorial.com/how-and-why-to-use-the-server-cron-instead-of-wp-cron/.
Q: Can you send me the cron line to call the function: xeroom_sync_schedule?
A: https://wpspeedmatters.com/external-cron-jobs-in-wordpress/ Gives can find a detailed way to setup and achieve a 3rd party cron job on WordPress. Here is a short resume:
- first, disable
define('DISABLE_WP_CRON', true);
- after that, go to the hosting dashboard cron job, create a new cron that executes every 1 or 2 minutes and add the URL
wget -q -O - https://www.yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Better Host Cron Job Management
Some of the better hosts provide WordPress cron management solutions eg Cloudways offer the below. Ask your host if they offer this if you are not IT competent.
How to Bulk Load Product Xero Settings
To bulk load your products with the Xero account settings values:
- Under WooCommerce Products choose Export.
- Select ID, SKU, Name and custom meta data.
- Open the CSV file and populate the products with the values you want in the Xeroom headed columns – see example below ( note Xeroom is currently misspelt as xerrom – to be fixed). In order to set the product to synch with Xero use the value 1. You can also amend any SKUs and other product data if you wish. Delete the rest of the columns and save as a CSV file ready for import.
- Import back into WooCommerce choose Import: Note that the Xero account meta data is held and set for the parent product only. All the variation children inherit the same values as is set for the parent and so any values that are different for the variations will not be loaded.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article