Jump to content

Jackson Tong

New Member
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Jackson Tong

  1. I'd like to know how to implement usage metrics billing as well.
  2. add_hook('ClientAreaSecondarySidebar', 1, function($secondarySidebar) { $shortcuts = $secondarySidebar->getChild('Client Shortcuts'); $shortcuts->addChild( 'Google', array( 'name' => 'Google', 'label' => 'Google', 'uri' => 'https://google.com', 'order' => 10, 'icon' => 'fa-rocket', ) ) ->setAttribute('target', '_blank') // working ->setAttribute('rel', 'noreferrer'); // not working }); with this code I can only see target attribute in my a tag.
  3. I would want to access my product moduleConfigOption1 inside CustomFieldSave hook add_hook('CustomFieldSave', 1, function($vars) { $customFieldValue = \WHMCS\CustomField\CustomFieldValue::firstWhere([ 'fieldid' => $vars['fieldid'], 'relid' => $vars['relid'] ]); // this works $client = $customFieldValue->client; $customField = $customFieldValue->customField; $customFieldValue->service; // this is null $customField->product; // null here too }); According to the document https://classdocs.whmcs.com/8.1/WHMCS/CustomField/CustomFieldValue.html CustomFieldValue has a public property name service, but it's null in my code so I can't do this:
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated