Can’t get woocommerce_get_price_html to work [closed]
I think your are missing parameters (even if you’re not using those) as per its definition and always try to return into filters instead of echo the value. Try the following: add_filter( ‘woocommerce_get_price_html’, array( $this, ‘get_price_html’ ), 10, 2); public function get_price_html( $price_html, $product ) { return ‘<a href=”https://wordpress.stackexchange.com/questions/344716/my-price”>’ . $product->get_price() . ‘</a>’; }