• Hello

    From the woocommerce desktop, when passing the status of an order from “pending” toward “completed”, in parallel to the “customer-completed-order” I would like to do my own treatment and send my own additional email based on the same data (order number, products bought, customer email adress…).

    How can I add this action (trigger a xxx.php) only for the ‘order complete’ action.

    Thanks for any idea.

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    Why don’t you simply override the order complete email template with your own custom one? Have a look at https://docs.woocommerce.com/document/template-structure/ for more details on how to get started with that.

    Thread Starter WebHippo

    (@jandard)

    Hello Riaan

    Thanks for your answer. I already was thinking to that solution, BUT , as non professional (i’m a volunteer webmaster) I haven’t the right knowledge to understand the code to write.

    My knwoledge will permit to store data of the order into a json file and to use these data to build my own treatment, outside wordpress triggered by a cron searching a dedicted reportory.

    I looked at the file customer-completed-email.php but my first concern was that I didn’t understand how works do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); and what I can do with it.

    This certainly the right place to grab the information sent into the mail, but looking at add_action, I still don’t understand what to do.

    What I need is just to store the information of the order (number, name, email, product…) in a json file and I will do the rest.

    Thanks

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to trig an action when email “order completed” is sent’ is closed to new replies.