Title: A hook run multiple time
Last modified: July 3, 2020

---

# A hook run multiple time

 *  [ankur89](https://wordpress.org/support/users/ankur89/)
 * (@ankur89)
 * [6 years ago](https://wordpress.org/support/topic/a-hook-run-multiple-time/)
 * hello
    i make some code to change the variation price if some condition true.
   I want to change the price when variation change for this i use ( woocommerce_product_variation_get_price)
   its working, but their is issue in this function run on page load also and so
   many times.how i resolve this issue please help. thanks in advance
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fa-hook-run-multiple-time%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years ago](https://wordpress.org/support/topic/a-hook-run-multiple-time/#post-13068925)
 * Hi there,
 * Without really know what code you’re using or what the intended conditions are,
   it’ll be hard to comment on what to do next. To review any code that you’ve already
   written, we’d recommend getting in touch with the web developer community at 
   large (e.g. [https://stackoverflow.com/](https://stackoverflow.com/)).
 *  Thread Starter [ankur89](https://wordpress.org/support/users/ankur89/)
 * (@ankur89)
 * [6 years ago](https://wordpress.org/support/topic/a-hook-run-multiple-time/#post-13089183)
 * function pr_reseller_price( $price, $product ) {
 *  $price =”1.5″;
 *  return $price;
 * }
    add_filter( ‘woocommerce_product_variation_get_price’, ‘pr_reseller_price’,
   10, 2 ); Hello thanks for reply this is code which i am using
    -  This reply was modified 6 years ago by [ankur89](https://wordpress.org/support/users/ankur89/).

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

The topic ‘A hook run multiple time’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [ankur89](https://wordpress.org/support/users/ankur89/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/a-hook-run-multiple-time/#post-13089183)
 * Status: not resolved