Skip Navigation

[Resolved] Emailing the author of a product

This thread is resolved. Here is a description of the problem and solution.

Problem:
Emailing the author of a product with CRED form

Solution:
you can use CRED hook cred_notification_recipients to send email to your product author.

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/emailing-the-author-of-a-product/#post-626069

Relevant Documentation:
=> https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#626040

Tell us what you are trying to do?
The site uses Woocommerce for all the products. Products are added by members. Visitors can browse the products but, instead of purchasing in the normal way, the product has a button which takes them to a form where they fill in their details. These need to be sent to the author of the product. I've sent the ID of the product to the CRED form and it's entering it into a field on the form. But I need to use that ID to get the email address of the product author without the visitor being able to see it.

Is there any documentation that you are following?
Not for this particular feature.

Is there a similar example that we can see?

What is the link to your site?
The site isn't live yet.

#626069

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - you can use CRED hook cred_notification_recipients to send email to your product author.

There are multiple ways you can do that like add hidden field that will hold the your product author email and then use this hidden field value and assign it using hook "cred_notification_recipients".

More info:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_notification_recipients

#626153

Thanks for the really speedy reply, Minesh, and the information.

You mentioned passing the email address in a hidden field. Would this be visible by the visitor if they view the source? I need to make sure it's never shown on the front-end at all which is why I passed the product id to the form in the hope I could use that to get the author email address.

Could you clarify that for me?

Many thanks again

Jon

#626154

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You mentioned passing the email address in a hidden field. Would this be visible by the visitor if they view the source? I need to make sure it's never shown on the front-end at all which is why I passed the product id to the form in the hope I could use that to get the author email address.
==> Yes - hidden html field will be visible in the source.

So - you should just use CRED hook cred_notification_recipients where you should find a way to grab the author's email ID based on your product ID or whatsoever and setup your notification.