Title: Appropriate Hook
Last modified: July 27, 2022

---

# Appropriate Hook

 *  [DaddioD](https://wordpress.org/support/users/daddiod/)
 * (@daddiod)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/)
 * 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 4 replies - 1 through 4 (of 4 total)

 *  [MayKato](https://wordpress.org/support/users/maykato/)
 * (@maykato)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/#post-15865404)
 * Hello,
 * This is a fairly complex development topic. I’m going to leave it open for a 
   bit to see if anyone is able to chime in to help you out.
 * I can also recommend [the WooCommerce Developer Resources Portal](https://developer.woocommerce.com/)
   for resources on developing for WooCommerce.
 * You can also visit the [WooCommerce Facebook group](https://www.facebook.com/groups/advanced.woocommerce/)
   or the `#developers` channel of the [WooCommerce Community Slack](https://woocommerce.com/community-slack/).
 *  Thread Starter [DaddioD](https://wordpress.org/support/users/daddiod/)
 * (@daddiod)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/#post-15872499)
 * It really shouldn’t be. The script is written and it works for almost all aspects
   it needs to. I am only needing to know if there is a hook that fires after the
   order is created and before any emails are sent.
 *  [Margaret S. woo-hc](https://wordpress.org/support/users/margaretwporg/)
 * (@margaretwporg)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/#post-15872584)
 * Hi [@daddiod](https://wordpress.org/support/users/daddiod/)
 * > I am only needing to know if there is a hook that fires after the order is 
   > created and before any emails are sent
 * Kindly take a look at our support documentation for WooCommerce hooks: [https://woocommerce.com/document/introduction-to-hooks-actions-and-filters/](https://woocommerce.com/document/introduction-to-hooks-actions-and-filters/).
 * More information can be found in this [article](https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/)
   and also [here](https://www.businessbloomer.com/woocommerce-visual-hook-guide-archiveshopcat-page/).
 * If these do not help get the info you are looking for, then reaching out to the
   development related support channels suggested my colleague may help.
 * If you require more help with the actual coding, we’d recommend hiring a developer
   or one of the customization experts listed at [https://woocommerce.com/customizations/](https://woocommerce.com/customizations/).
 * Kindly be informed that support for custom coding is beyond the [scope of support](https://woocommerce.com/support-policy/)
   we are able to provide in this forum. This particular forum is for questions 
   that are related to the WooCommerce core features.
 * I hope that gets you pointed in the right direction.
 *  Thread Starter [DaddioD](https://wordpress.org/support/users/daddiod/)
 * (@daddiod)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/#post-15873466)
 * Coding is done and works as needed. Just looking for the proper hook. I will 
   look more into the links suggested.

Viewing 4 replies - 1 through 4 (of 4 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/)

 * 4 replies
 * 3 participants
 * Last reply from: [DaddioD](https://wordpress.org/support/users/daddiod/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/appropriate-hook/#post-15873466)
 * Status: not a support question