我正在构建一个与wordpress中的price html块交互的函数。这是我的密码
add_filter( \'woocommerce_get_price_html\', array( $this, \'get_price_html\' ));
public function get_price_html( $product )
{
echo \'<a href="my-price">\' . $product->get_price() . \'</a>\';
}
它不起作用了。怎么了?