• 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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support RK a11n

    (@riaanknoetze)

    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/).

    Thread Starter ankur89

    (@ankur89)

    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 4 years, 8 months ago by ankur89.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘A hook run multiple time’ is closed to new replies.