Hook and Change Variation Price
-
Hello,
I am trying to hook and update the Variation price. Much like i am with the below filter:
function return_custom_price($price, $product) {
$new_price = ($price + 2.00);
return $new_price;
}
add_filter(‘woocommerce_get_price’, ‘return_custom_price’, $product, 2);The problem is that the above filter only works on the Simple Product price and not the Variable Product price
I have tried
add_filter( ‘woocommerce_variation_price_html’, ‘my_html’, 10, 2);
but that only updates the html and not the actual Price.Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hook and Change Variation Price’ is closed to new replies.