Title: Appropriate Hook
Last modified: July 30, 2022

---

# Appropriate Hook

 *  Resolved [DaddioD](https://wordpress.org/support/users/daddiod/)
 * (@daddiod)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/appropriate-hook-2/)
 * I have a script that adds a generated profile ID to the end of a product name
   if that product is part of an order.
 * This script fires on the ‘woocommerce_pre_payment_complete’ hook. This works 
   great except for one thing, it does not change the product name before the New
   Order email is sent to the store manager. I am sure it is because I am using 
   a hook after the new order email is created.
 * Does anyone have a better suggestion on the appropriate hook to use to accomplish
   this?

Viewing 1 replies (of 1 total)

 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/appropriate-hook-2/#post-15872651)
 * I’m marking this thread closed in favor of the earlier one created on the same
   topic:
    [https://wordpress.org/support/topic/appropriate-hook/#post-15872499](https://wordpress.org/support/topic/appropriate-hook/#post-15872499)

Viewing 1 replies (of 1 total)

The topic ‘Appropriate Hook’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/appropriate-hook-2/#post-15872651)
 * Status: resolved