• Resolved WebHippo

    (@jandard)


    Hello

    I need to send a custom email with a pdf attached to all new orders issues from US citizen. The pdf is a, IRS receipt.
    I developped this email for direct donation with Paypal button based on IPN.
    Now with WC and Paypal, I need to send the same email for US citizen buying something in the shop.

    how to call my php code, at reception of a new order ?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @jandard

    Thanks for reaching out!

    I understand that you want to send another email once a US customer completed order at your shop, is that correct?

    I found this article on How to Customize WooCommerce Emails could be a good starting point.

    Hope this helps!

    Thread Starter WebHippo

    (@jandard)

    Hello Xue

    Thanks a lot, it help.

    The post is very clear but the modifications explained are only text oriented.
    There is a link in the post to “hooks” that explains how to trig my code inside functions.php.

    Great.

    My last question 🙂 is : how to retrieve the data (name of purchaser, his/her full address, amount spent …) as my order oriented code will not linked to the current order (right ?). So I need to get a pointer to the order and methods to retrieve what I need.

    Do you know where to read an example of this ? Code sample helps me to understand as I’m not professional.

    Thanks a lot

    Hi @jandard

    I’m glad that you found the link helpful.

    These forums are meant for general support with the core functionality of WooCommerce itself. What you want to achieve is a bit complex and would require customization to do it. Since custom coding is outside our scope of support, I am leaving this thread open for a bit to see if anyone can chime in to help you out.

    For questions related to development and custom coding, your best bet is to ask on any of these channels for support. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, too.

    WooCommerce Developer Resources Portal
    WooCommerce Advanced Facebook group
    WooCommerce Community Forum
    WooCommerce Developer Slack Channel.
    – Hire a WooCommerce Expert

    Thread Starter WebHippo

    (@jandard)

    Thank you.

    I posted a question on Slack.

    But this support community could know how to retrieve the order’s information.

    This should be my last issue to be solved as for the custom code, I know what to do. I did it already on receipt of the PayPal IPN for a PP donation button.

    All issues I have are due to WC rerouting the IPN message to their code instead allowing the IPN to reach my listener URL.

    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Send custom email at new order reception’ is closed to new replies.