Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WP Cron - Sync local store items to C2O stock availability. #21

Closed
AshleyRedman opened this issue Aug 31, 2022 · 3 comments
Closed

WP Cron - Sync local store items to C2O stock availability. #21

AshleyRedman opened this issue Aug 31, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@AshleyRedman
Copy link
Member

AshleyRedman commented Aug 31, 2022

As C2O stock availability changes, we need to reach out their endpoint & re sync their stock count with local WC products.

Example:
01/01/2022 -> C2O have 5 tops, 5 trousers & 5 ties available.
02/01/2022 -> C2O have 5 tops, 4 trousers & 5 ties available.

In the example situation above, C2O have less stock so our local store must up their it's stock available to reflect this to disallow over selling items. There will always be times were the store owner will need to reconcile issues with C2O as their API is not kept up-to-date per transaction.

What needs implementing:

WP-Cron to fetch stock results & sync with local product stock availability

  • C2O only expose an endpoint to a .csv which contains their stock, this needs parsing

New group of options in the WPC2O settings screen

  • Admin can select the frequency which the plugin will fetch stock results to sync (24 hours min edit that is some time after 3:30am)
@AshleyRedman AshleyRedman added the enhancement New feature or request label Aug 31, 2022
@b-i-lewis
Copy link

Hi @AshleyRedman I'm one of the devs at c2o.

Our stock csv is updated daily at around 3:30am. To attempt to update more than once a day after this time would yield no results.

If you have any questions feel free to reach out.

@AshleyRedman
Copy link
Member Author

Hi @AshleyRedman I'm one of the devs at c2o.

Our stock csv is updated daily at around 3:30am. To attempt to update more than once a day after this time would yield no results.

If you have any questions feel free to reach out.

Hi @b-i-lewis thanks for getting in touch! We have been reading the API docs & will update the scope of this issue to represent that time frame.

@AshleyRedman
Copy link
Member Author

Completed in latest PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants