• Tanya

    (@gazette-gal)


    Hello, I’ve customized the email that gets sent out when someone submits a listing but the one piece I can’t find is the call for the Event Tag. Can you please tell me what I would need to add so that in the email it displays the Event Tag? I’ve set it up so that all of my Event Tags indicate the Sale Date that they submitted the form for. The email works perfect as is, I would just really like one more line that shows “yardsale-may-06” (for example).

    If you’re curious on how I’ve customized this plugin and put it to use on my site, you can see it here: https://panopticnews.com/pogs/

    Thank you for your help and for creating this plugin in the first place. ??
    Tanya

    This is my custom email:

    $msg = '<p>' . __('Thank you for your community yard sale entry for our Parade of Garage Sales section.', 'community-yard-sale') . '</p>' .
                                    '<p>' . __('Your listing details are as follows:', 'community-yard-sale') . '</p>' .
                                    '<p>' . __($_POST['street'], 'community-yard-sale') . '</p>' .
                                    '<p>' . __($_POST['listing'], 'community-yard-sale') . '</p>' .
                                    '<p>' . __('Please do not reply to this email, we will not receive it.', 'community-yard-sale') . '</p>' .
                                    '<p>' . __('Please use the links below to edit or delete your entry.', 'community-yard-sale') . '</p>' .
                                    "<a href="$editUrl">" . __('Edit Yard Sale Entry', 'community-yard-sale') . '</a>
    
    ' .
                                    "<a href="$deleteUrl">" . __('Delete Yard Sale Entry', 'community-yard-sale') . '</a>
    
    ' .
                                    '<p>' . __('If you have any questions please call 403-redacted or email redacted.', 'community-yard-sale') . '</p>';
    
                            $headers = array('From: ' . __('Gateway Gazette PoGs No-Reply', 'community-yard-sale') .
                                             ' <no-reply@' . $this->plugin->getEmailDomain() . '>' ,
                                             'Content-Type: text/html');
                            $h = implode("\r\n", $headers) . "\r\n";
                            wp_mail($_POST['email'], __('Yard Sale Entry', 'community-yard-sale'), $msg, $h);
                            wp_mail(['redacted'], __('NEW Yard Sale Entry', 'community-yard-sale'), $msg, $h);

    https://www.ads-software.com/plugins/community-yard-sale/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Tanya

    (@gazette-gal)

    Just to clarify, I understand that it would be a line similar to:

    '<p>' . __($_POST['street'], 'community-yard-sale') . '</p>' .

    I just can’t figure out what to replace the $_POST['street'] part with.

    Thanks.

    Plugin Author Michael Simpson

    (@msimpson)

    It is the $event variable.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Putting Event Tag into email’ is closed to new replies.