A user on the Easy Digital Downloads’ forums wanted a new email tag for the purchase receipt so they could list each email address of the Shop Vendor who added the download. This is so the customer who purchased the product knows who to get in contact with should they have any questions.

Simply copy and paste the following functions (mind the opening PHP tag) into your child theme’s functions.php or custom plugin.

In the purchase receipt field under downloads → settings → emails, you can enter this:

For more information about your order, please contact one of the following vendors:

{vendor_emails}

This will output the following in your purchase receipt assuming the user purchased 3 different downloads, added by 3 unique Shop Vendors:

For more information about your order, please contact one of the following vendors:

Download One
shopvendor1@email.com

Download Two
shopvendor2@email.com

Download Three
shopvendor3@email.com

6 comments

  1. I copied this code exactly and it doesn’t seem to work. I did some debugging and it seems like the line $downloads = edd_get_purchase_session(); doesn’t return anything (I tried printing out $downloads and got an error), any suggestions for getting this to work?

  2. Is it possible to show other vendor information?

    I am looking for Vendor phone number, contact name etc which I am capturing using FES at vendor registration.

    Thanks

  3. Hi,

    I am using the checks payment gateway, as such all my submitted orders will default to an Pending state. Once I receive payment, I manually go into Payment History tab and update the payment status to Complete.

    The above code does not include the vendors email address when the purchase receipt emails are sent upon me updating the payment status.

    Can you help or guide me as to how I can include the vendor email address in the above scenario.

    Thanks

Comments are closed.