Hey @fahadmahmood,
Let me begin by apologizing for getting your @ wrong. Sorry about that.
I dived into the plugin again and I must applaud you for the level of though that you’ve brought to this – it’s really good. The issue is that because things aren’t communicated clearly or easily the UX drops.
Anywho – I think I figured this out and will attempt to give you some script to add to the CRONS tab to make things more clear.
The only recommendation I have is that maybe tokenizing the execution rather than have an allow/reject table may be more reliable and less steps for the user.
Here’s my first thoughts of a recommended addition to the TOP of the Crons tab – before the URLs
CRONS HOW-TO
==============
This plugin works by moving WooCommerce’s inventory management to a new table and making that the primary record for your stock. In order to maintain interoperability with other WooCommerce functions and extensions, the two inventory areas are kept in sync using a CRON command. This is easy, and can be executed manually OR automatically dependent on your needs.
Before we get started, make sure you have created your stock locations, enabled each location here (make this a link to the Stock Locations tab) added some products to them.
NOTE: For maximum security, we keep a log of every IP that attempts to trigger this CRON and you will have to ALLOW that IP to trigger the CRON before it will actually execute.
Let’s get started!
- Step 1: Toggle the CRON Execution button ON. This tells the system to look out for CRON requests.
- Step 2: Click this LINK (make this a link to the CRON command with day set and target=_stockloccrontest set) to manually execute your first Stock Locations CRON in a new tab
- Step 3: Do not be alarmed that you received a notice that are are not allowed to execute the command – that’s our security at work! Click here (link to crons tab) to refresh this page.
- Step 4: Now that you have attempted to run the CRON we have captured your IP and you are able to allow the CRON to execute. Check the table to your left for your IP. If you are uncertain of your IP address click here (link to WhatIsMyIP that opens in new tab). Once you identify your IP, ensure there is a check mark in the Allow/Reject column.
- Step 5: Once you have “allowed” your IP to execute the CRON, click this link (make this a link to the CRON command with day set and target=_stockloccrontest set)
- Congratulations! You’re all done and products have been sync’d across both inventories. As you add new products, return here to sync them.
Add a button with “Sync Inventories” below this text – it should be a link to the CRON command with day set and target=_stockloccrontest set
Hope that helps!
Hi @doyenwilliams,
Thank you so much for the detailed feedback and kind words — I really appreciate the time you took to write this. Your explanation and suggestions are genuinely helpful, especially the step-by-step CRON guide and “Sync Inventories” idea. I agree the UX around this can be improved and your recommendations make a lot of sense.
And yes, for the Total Stock to sync with WooCommerce stock, the CRON needs to be enabled in the plugin and executed either manually or through a server-side CRON job.
I’ll review your suggestions carefully and try to implement improvements in an upcoming update. Thanks again for the thoughtful feedback and support.