Closed n8whnp closed 7 years ago
Connected to this is the fact that reseller plans (with associated domains) only show usage stats for the subscription connected to the primary domain. In other words, the usage stats showing in WHMCS are completely wrong.
For example, one reseller of ours is at 88GB of 120GB storage usage, however in WHMCS it only shows 11GB of "Unlimited" because that's what the subscription associated with their 'primary' domain in WHMCS is configured to.
I'm working on modifying the plesk_UsageUpdate() hook such that it detects hosting plans of type 'reselleraccount' in WHMCS and, instead of grabbing webspace (subscription) stats for those plans, it will grab reseller account stats. Once implemented, this should resolve both of our issues with usage stats not updating properly.
I've now got some code in place for this that should work to resolve both of these issues in that it will grab reseller stats based on username for all resellers on the server that WHMCS sends to _UsageUpdate. It hasn't yet been tested. See here: https://github.com/jas8522/whmcs-plugin/tree/reseller-plan-stats-update
This is now confirmed tested and fixed with #19 as referenced above.
This can be closed now.
With Plesk it is possible to create resellers without a domain name, so when the getWebspacesUsage function in comes to get the usage statistics, it fails with the following in the module log: Request: <?xml version="1.0" encoding="UTF-8"?>
Response: <?xml version="1.0" encoding="UTF-8"?>
Requisites: