0

We found that we sometimes run out of stock/inventory due to orders pending payment. Is there a way to "release" those stock/inventory after a specified amount of time, automatically, without us having to check regularly for orders pending payment and cancelling manually?

2
  • Is my answer working for you ? Jan 23, 2017 at 23:30
  • You can check out this extension auto cancel order to automatically cancel the order after a specific time.
    – Mohit Rane
    Jun 2, 2021 at 10:08

1 Answer 1

3

One of the solutions is to create a cron job that will cancel the orders left waiting for payment X hour or days after they were created.
That way your stocks would be updated.

Here you can find explanations and examples on how to configure and create cron tasks :
- https://www.maximehuran.fr/en/create-a-cron-job-with-magento-2/
- https://www.atwix.com/magento-2/setting-up-cron-jobs/
- http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cron.html

Here it is same logic for Magento 1 : How to automatically cancel pending orders after a specified amount of time?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.