Skip to content

Script to be used as a CRON job in your server that get all orders from X days ago and cancel all of them using Magento 2 API.

Notifications You must be signed in to change notification settings

cotriml/magento2-cancel-old-expired-orders

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

magento2-cancel-old-expired-orders

Script to be used as a CRON job in your server to get all orders from X days ago and cancel all of them using Magento 2 API.

All you have to do is change the value of the following variables:

  • $token (To give access to your Magento 2 API)
  • $url (Your Web Site URL)
  • $daysAgo

Attention: The ENDPOINT that this script uses to access the Magento 2 API is '/rest/V1/orders', if yours is different, just change the $endpoint variable.

About

Script to be used as a CRON job in your server that get all orders from X days ago and cancel all of them using Magento 2 API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages