How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Allow server module Loader Functions to include context from other Loader Functions



Server Module ConfigOptions Loader Functions (https://developers.whmcs.com/provisioning-modules/loader-functions/) are great, however they're limited in their capability. I'd like to be able to configure multiple Loader Functions with dependencies on each other, or allow single Loader Functions to populate multiple ConfigOptions.

This would be exceptionally useful when API calls need to be nested, such as when picking a location with multiple options. For example:

configOption1 = https://myapi/datacenters - Gets a list of datacenters
configOption2 = https://myapi/datacenters/1/cages - Gets a list of cages available in datacenter 1
configOption3 = https://myapi/datacenters/1/cages/3/racks - Gets a list of racks available in cage 3 in datacenter 1

I haven't found a good way to do this with Javascript since it doesn't have access to $params to get the server hostname and API key.

Enabling developers to make modules like this would feel much more polished, and is a good look for WHMCS.
Tags
  Server Modules

Post the first comment

Login to post a comment.