Add downloadable product permissions in bulk in WooCommerce orders
This script is useful when product ids have changed for digital products and you need to go through every order and generate new downloadable permissions
This script is not supported in any way or guaranteed to work. You use it at your own descretion. Please don't use on live sites first. First use on a staging site to make sure it works. Then backup before using on live site.
Step to use this script:
- Copy this script to your WordPress installation directory, the same directory as wp-config.php .
- In the script, change the PASSCODE to something more secure.
- In browser, go to the URL of the script to run it. Pass in the passcode, old product ID, and the new product ID in the URL. For example:
http:/mydomain.com/wordpress/bulk-add-download.php?pass=1234&old-product-id=100&new-product-id=110