Change email address for Send Enquiry popup

This topic contains 5 replies, has 3 voices, and was last updated by  Stiofan O’Connor 6 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #419353

    foodtrucks2u
    Expired Member
    Post count: 21

    Hi,
    can you tell me how to change the email address recipient in the Send Enquiry form? Preferably using an action or other method in functions.php?

    We want all the Enquiries in the Send Enquiry pop up to go to the site admin, not the listing email address.

    Is this possible without changing the core template file itself?

    Cheers.

    #419431

    Alex Rollin
    Moderator
    Post count: 27815

    The enquiry form email goes direct to the email address added as part of the listing, and admin gets a copy [but you can turn that off]: https://wpgeodirectory.com/docs/core-notifications/

    What you want should be possible with a customization which is outside support.
    But this post shows a different way of doing it using your own form: https://wpgeodirectory.com/formidable-forms-in-geodirectory-tabs/

    #419595

    foodtrucks2u
    Expired Member
    Post count: 21

    Hi Alex,
    yep, read that, but don’t want to use formidable forms and understand how the cc emails work, which does not solve the question at all. I actually spent quite a bit of time researching this before reaching out to who I would consider the best people to at least point me in the right direction (ie the developers), even a slight hint at which section of the template to modify would help better than an answer that has been pointed to many times.

    Not meaning to be rude, but expected a little more help. Guess i’ll have to figure out myself.

    Cheers.

    #419679

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Not tested, maybe something like this

    
    
    add_filter('geodir_sendEmail_to','_my_email_capture',10,11);
    function _my_email_capture($to, $fromEmail, $fromEmailName, $toEmail, $toEmailName, $to_subject, $to_message, $extra, $message_type, $post_id, $user_id ){
    
    if($message_type=='send_enquiry'){
    $to = get_option( 'admin_email' );
    }
    
    return $to;
    }

    Stiofan

    #419807

    foodtrucks2u
    Expired Member
    Post count: 21

    Hello Stiofan,
    thank you very much, that worked for me and is exactly what I needed. Appreciate it immensely.

    Cheers.

    #419866

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Great! 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket