【问题标题】:How to get client service custom fields value in the whmcs hook?如何在 whmcs 挂钩中获取客户端服务自定义字段值?
【发布时间】:2018-03-27 19:51:49
【问题描述】:

如何在 whmcs 挂钩中获取客户端服务自定义字段值?

我想在 AfterModuleCreate 钩子上做点什么。

【问题讨论】:

    标签: hook whmcs


    【解决方案1】:

    根据docs,钩子会收到module parameters

    add_hook('AfterModuleCreate', 1, function($vars) {
    
        $customFields = $vars['params']['customfields'];
        $fieldValue = $customFields['FieldName'];
    
    });
    

    【讨论】:

    • 你好。我正在尝试使用'chave' => $params['configoptions']["Chave"] 获取自定义字段值,但我没有得到它。你能帮助我吗?看图:prnt.sc/p04bdc
    • 您是否按照上面的答案尝试过:$customFields = $vars['params']['customfields']; $chave = $customFields['Chave'];注意字母大小写,$customFields['Chave'] 与 $customFields['chave'] 不同
    • 您能告诉我如何在 clientssummary.tpl 中获取自定义字段的值吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-06-11
    • 2018-09-07
    • 1970-01-01
    • 2022-10-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多