cesarlopes Posted March 15, 2020 Share Posted March 15, 2020 Hello, I would like to know how to use the CustomField or Client Class and obtain all registered custom fields and their values. I tried the code below but didn't get any results: <?php use WHMCS\User\Client; use \WHMCS\CustomField; require_once __DIR__ . '/../../../init.php'; $Client = Client::find('110'); //user id example $clientFields = $Client->customFieldValues; print_r($clientFields); 0 Quote Link to comment Share on other sites More sharing options...
cesarlopes Posted March 16, 2020 Author Share Posted March 16, 2020 Hello, I got it to retrieve all the values, but did not return the name of the custom fields $clientFields = $Client->customFieldValues()->get(); Could someone help me? I think I need to use this other class, but I didn't quite understand how to relate the client object to it. https://classdocs.whmcs.com/7.9/WHMCS/CustomField.html 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.