Jump to content

TicketAdminReply hook, does it return anything


Recommended Posts

Thanks, that works but the problem I'm having now is that the email is sent before the hook is activated, so my DB changes don't take affect but on the site. Back to the drawing board then :( thanks.


- - - Updated - - -


It also seems that it keeps updating the 'admin' column after my hook runs as no matter what I place there in that column it still keeps the posting user.


- - - Updated - - -


Scratch the second, I found the problem with the second not updating. But it's still sending email before the hook.

Link to comment
Share on other sites

If you aren't seeing the changes in the email then you would need to create an EmailPreSend hook and pass back a new variable containing the admin you would like to change the reply to and then update the email template to use this new variable.

Link to comment
Share on other sites

Not working either, unfortunately that runs on the templates for emails and not on the ticket text sent. So it won't grab the variables in the ticket text during reply. I tried this and it won't replace it before sending the email:


function PresendEmailTicket ( $vars ) {

$merge_fields = array();

$merge_fields['test'] = 'tester2';


return $merge_fields;



add_hook("EmailPreSend", 2, "PresendEmailTicket");

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • 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