Jump to content

fabianbur

Retired Forum Member
  • Posts

    2
  • Joined

  • Last visited

About fabianbur

fabianbur's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. This seems easier, but it still doesn't work <?php use WHMCS\Database\Capsule; add_hook("EmailPreSend", 1, function($vars){ return array("auth_code" => Capsule::select(Capsule::raw('SELECT authdata FROM tblclients WHERE id = "' . $vars['relid'] . '")); }); I have inserted {$auth_code} in email template
  2. I suppose this is simple, but it is making my life difficult. I need in "Invoice Payment Confirmation" Include a value from authdata field of tblclients table. Here I have searched and maybe something similar to this hook is the way <?php use WHMCS\Database\Capsule; add_hook('EmailPreSend', 1, function($vars) { if (in_array($vars['messagename'], array('Invoice Payment Confirmation'))) { $codigopay = Capsule::select(Capsule::raw('SELECT authdata FROM tblclients WHERE id = "' . $vars['relid'] . '")); foreach ($codigopay as $v) { $merge_fields['code_payme'][] = $v->authdata; } return $merge_fields; } }); Thank you very much for the help.
×
×
  • 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