When using the fpd_form shortcode, an email isn't sent to the client. Is this how it's supposed to work? Or is there also supposed to be an email sent to the client?
Ideally an image of the product created would be sent on submission to the client, and the order would be sent to the site owner.
Best Answer
J
Jack McDowell
said
over 6 years ago
Gianmarco, we're using version 3.4.8, but I would imagine that the hook is the same in most versions. If you use the code above make sure that you replace email1 & email2 with real emails.
The code I have is made to send 2 emails, one to the admin and one to the customer. Basically all this does is when fpd_shortcode_order_mail fires (order submitted) it will fire a wp-mail() call. I would play around with that and install the wp-mail-log plugin to see if it's firing.
I would also try one email at a time instead and see if it works:
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-7890 or go to our website at www.example.com.' );
FYI this code will allow you to send the email to other people, but it sends the admin link, not a rendered image. Is there a way to hook the rendered image into the email? If so we could add it to the message.
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-1234 or go to our website at www.google.com.' );
I think this can be a very useful implementation, but this code didn't work for me. Any update?
J
Jack McDowell
said
over 6 years ago
Answer
Gianmarco, we're using version 3.4.8, but I would imagine that the hook is the same in most versions. If you use the code above make sure that you replace email1 & email2 with real emails.
The code I have is made to send 2 emails, one to the admin and one to the customer. Basically all this does is when fpd_shortcode_order_mail fires (order submitted) it will fire a wp-mail() call. I would play around with that and install the wp-mail-log plugin to see if it's firing.
I would also try one email at a time instead and see if it works:
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-7890 or go to our website at www.example.com.' );
Hello Jack, thank you for your help on this topic.
I have some experience with coding but im no expert at all. So i wanted to ask, is it possible to use this code somehow with the woocommerce plugin?
I want to attach the design or the admin download link to a third party email (my supplier). So, is there a way to incorporate this function into the woocommerce version of the plugin?
Jack McDowell
When using the fpd_form shortcode, an email isn't sent to the client. Is this how it's supposed to work? Or is there also supposed to be an email sent to the client?
Ideally an image of the product created would be sent on submission to the client, and the order would be sent to the site owner.
Gianmarco, we're using version 3.4.8, but I would imagine that the hook is the same in most versions. If you use the code above make sure that you replace email1 & email2 with real emails.
The code I have is made to send 2 emails, one to the admin and one to the customer. Basically all this does is when fpd_shortcode_order_mail fires (order submitted) it will fire a wp-mail() call. I would play around with that and install the wp-mail-log plugin to see if it's firing.
I would also try one email at a time instead and see if it works:
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-7890 or go to our website at www.example.com.' );
}
add_action('fpd_shortcode_order_mail', 'func_fpd_shortcode_order_mail', 10, 4);
If you want to pass the $message to an admin change wp-mail to:
wp_mail( 'to-email@example.com', 'New Product Designed', $message );
1 person has this question
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstJack McDowell
FYI this code will allow you to send the email to other people, but it sends the admin link, not a rendered image. Is there a way to hook the rendered image into the email? If so we could add it to the message.
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( '{{EMAILS}}', 'New Product Designed', $message );
}
add_action('fpd_shortcode_order_mail', 'func_fpd_shortcode_order_mail', 10, 4);
Dmitry
Where exactly should I enter this code?
Jack McDowell
Functions.php, just remember to replace the Emails section with the right email!
This version also sends an email to the customer:
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( 'email1@email.com, email2@email.com', 'New Product Designed', $message );
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-1234 or go to our website at www.google.com.' );
}
add_action('fpd_shortcode_order_mail', 'func_fpd_shortcode_order_mail', 10, 4);
Gianmarco Baldassarre
I think this can be a very useful implementation, but this code didn't work for me. Any update?
Jack McDowell
Gianmarco, we're using version 3.4.8, but I would imagine that the hook is the same in most versions. If you use the code above make sure that you replace email1 & email2 with real emails.
The code I have is made to send 2 emails, one to the admin and one to the customer. Basically all this does is when fpd_shortcode_order_mail fires (order submitted) it will fire a wp-mail() call. I would play around with that and install the wp-mail-log plugin to see if it's firing.
I would also try one email at a time instead and see if it works:
function func_fpd_shortcode_order_mail($inserted, $customer_name, $customer_mail, $message)
{
wp_mail( $customer_mail, 'New Product Design Received','We have received your design submission and our designer will be in touch shortly. If you have any questions call our artwork team at 123-456-7890 or go to our website at www.example.com.' );
}
add_action('fpd_shortcode_order_mail', 'func_fpd_shortcode_order_mail', 10, 4);
If you want to pass the $message to an admin change wp-mail to:
wp_mail( 'to-email@example.com', 'New Product Designed', $message );
Manuel Larrazábal
Hello Jack, thank you for your help on this topic.
I have some experience with coding but im no expert at all. So i wanted to ask, is it possible to use this code somehow with the woocommerce plugin?
I want to attach the design or the admin download link to a third party email (my supplier). So, is there a way to incorporate this function into the woocommerce version of the plugin?
Again, thank you for your help.
-
Adding Fancy Products to Categories
-
Shortcode for specfic product designer
-
What theme is recommended to use with FPD ?
-
Exclude Image from export
-
Google Font Family adds extras
-
Floating Dialog box
-
Uploadzone not working
-
Image transparency like in T-shirt demo
-
How do I get clipart
-
What does the LOAD button do / what is it for?
See all 2194 topics