Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’

I recently updated WooCommerce on a site that I didn’t make myself. After doing this, then I saw the following line in the error-log:

woocommerce_get_price is deprecated since version 3.0.0!
Use woocommerce_product_get_price instead.

But when I google woocommerce_get_price, then I can find no documentation on it, besides for this hookr-page and this page, where it just says that it’s deprecated. But I can find no information about input and output for woocommerce_get_price and woocommerce_product_get_price. It feels like that it’s simply a renaming, – but how do I figure out, if I can simply replace the name of that filter, without having to test everything page and function on the website?

It’s a function in a plugin that has been custom-made for this suppliers sites. And the function looks like this:

public function woocommerce_get_price($price, $product) {
$price = $this->get_user_discounted_price($price, $product);

return $price;

Read more here:: Replacing a deprecated filter ‘woocommerce_get_price’ with ‘woocommerce_product_get_price’

Leave a Reply

Your email address will not be published. Required fields are marked *