Updated to use WHMCS 5.2 and up only