• Resolved HideTheGarlic

    (@hidethegarlic)


    Hey all. I’ve browsed the forum and can’t find a decent solution to this. Basically, my supplier adds my item tracking number as a Private note on the order page. At the moment, every time one of my orders is shipped I manually send a Customer Note telling them their Tracking number. That’s okay with a few orders, but my business is growing so it would nice to automate it.

    I can see two different way of doing it, but need some expert help. Is it possible to use the private note and take the info from it and add it to a customer note to send automatically. Or can the data be used on the Completed order email to wrap it all together nicely?

    All help is appreciated. Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @hidethegarlic

    To achieve this, simply customize the Completed Order email template. For example, you can include the tracking number in the email template by using the following code snippet:

    $order_notes = $order->get_customer_order_notes();
    if ( ! empty( $order_notes ) ) {
    foreach ( $order_notes as $order_note ) {
    if ( strpos( $order_note->comment_content, 'Tracking number:' ) !== false ) {
    echo '
    
    ' . __( 'Tracking number:', 'woocommerce' ) . ' ' . $order_note->comment_content . '
    
    ';
    }
    }
    }
    ?>

    This code snippet will check if there’s a customer note containing the tracking number and display it in the Completed Order email.

    Please note that modifying the email template requires some knowledge of PHP and HTML. If you’re not comfortable with making these changes, I recommend seeking assistance from a developer or someone experienced in customizing WooCommerce templates.

    Here are some additional resource that might be helpful:

    I hope this helps! Thanks!

    Thread Starter HideTheGarlic

    (@hidethegarlic)

    Thank you for this @shameemreza I really appreciate your help. I’ve just added this to the email template and got this result

    https://pasteboard.co/SSBHx57z2TjP.png

    Oh and also the notes I get the tracking with are private notes?

    Thanks

    Hi there @hidethegarlic ??

    Thank you for contacting Woo support!

    First, apologies for the delay. We have seen a recent influx of tickets and are currently working through a backlog.

    Include Tracking Number on Completed Order Email

    As I understand, you would like to automate things with including the order note containing the tracking number in an email sent out automatically. Correct?

    Feel free to check out AutomateWoo, and its long list of available triggers (linked here), as AutomateWoo has the tools you need to grow your store.

    Its value is in that it allows you to create Workflows – which are made up of different combinations of Triggers, Rules and Actions within WooCommerce.

    I trust that points you in the right direction, but if you have more questions, let us know. We’re happy to help.

    Thread Starter HideTheGarlic

    (@hidethegarlic)

    Thanks for that, it looks like it will do the job!

    Hi @hidethegarlic


    You’re welcome! I am going to mark this ticket as resolved, If you have any new questions, please create a new ticket.

    Cheers!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Include Tracking Number on Completed Order Email’ is closed to new replies.