snake Posted January 29 Share Posted January 29 We are discontinuing one of our products, and need to bulk upgrade all customers who are using it to a different product. I got a reply from support telling me this will require custom code, see below. Can anyone do this for me ? Quote There is no way to achieve this directly in the admin UI since upgrades are really intended to be triggered directly by customers, but I can see how this would be helpful in this scenario. If this is a feature that you would like to be implemented, please consider submitting a feature request here - that way, our other clients can vote on your suggestion. We also find this useful to ensure that every suggestion is reviewed thoroughly by our team. In the meantime, you could achieve this by writing a PHP script that finds all instances of the product that you are sunsetting and upgrades them to the new product by utilising our API: GetClientsProducts: https://developers.whmcs.com/api-reference/getclientsproducts/ - pass in the pid of the product that you are sunsetting to get a list of all services that are an instance of that product UpgradeProduct: https://developers.whmcs.com/api-reference/upgradeproduct/ - iterate through the array of services returned by the above API command, and upgrade them As this would be considered making a third-party customisation to WHMCS, I am afraid that implementing this is not something that we can assist you with (though we are of course happy to answer specific questions). However, our wonderful community of third-party developers in the Developer Corner on WHMCS.Community can surely help: https://whmcs.community/community/41-developer-corner/ 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Solution Posted January 29 Share Posted January 29 Hey yes correct, there are 2 ways 1. if old product and new product have same price then just update pid in Database directly and it will work for you 2. but if old product and new product price is not same then better run the upgrade API call write simple script on root or under cron folder 0 Quote Link to comment Share on other sites More sharing options...
snake Posted February 14 Author Share Posted February 14 (edited) The price is not the same, so it needs upgrade, I am not a php dev, can you share the script? Edited February 14 by snake 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.