• Resolved Mark Howells-Mead

    (@markhowellsmead)


    I’m using the woocommerce_order_status_changed hook to add a generated custom item meta value to an item in the relevant order when the status of the order is changed to “completed”.

    I then want to show that custom meta in the email which is sent out (emails/customer-completed-order.php). However, it would appear that the hook I mention above runs after the email is sent.

    I’ve tried modifying the priority of the hook call, but this makes no difference.
    Does anyone know of an earlier hook which would indicate that the status has been changed, which is triggered before the email is dispatched?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Saif

    (@babylon1999)

    Hello @markhowellsmead,

    I’m using the woocommerce_order_status_changed hook to add a generated custom item meta value to an item in the relevant order when the status of the order is changed to “completed”.

    I’m not sure if there is a hook that’s fired before the status change, this is also considered a custom development topic which is not within our scope of support.

    If you’re using ACF to add the custom fields, I found the following thread with a suggested good solution: https://support.advancedcustomfields.com/forums/topic/field-updates-after-post-update/

    Alternatively, you can disable the Complete email notification from WooCommerce > Settings > Emails and use our official automation extension to create a custom workflow.

    For your case, I believe it should look like this:


    Link to image: https://i.imgur.com/9nG0BgM.png

    We’re currently running Black Friday deals, so it’s a great time to go grab it.

    I should note that all our extensions have a 30-day refund policy. If the product doesn’t work the way you need it or you think another product would work better, we are more than happy to provide a full refund.

    Hope this helps!

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Howdy! ??

    I’m marking this as resolved since we haven’t heard from you for some time – we’ll be here to assist if and/or when you are ready.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Generating and showing custom item meta on status change’ is closed to new replies.