Welcome to the support center for

Fancy Product Designer & Multistep Product Configurator

Answered

FPD_FORM client email not sending

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.



1 person has this question

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);

Where exactly should I enter this code?

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);



I think this can be a very useful implementation, but this code didn't work for me. Any update?

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.' );

}

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 );


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.


Login or Signup to post a comment