Problem with woocommerce_get_price_html filter
-
Great plugin!
I have a little problem with a
get_price_html()
method of aWC_Product
class. You usewoocommerce_get_price_html
filter to manipulate an output. At the beginning of thefilter_woocommerce_get_price_html
method you get product ID by a functionget_the_ID()
.The second parameter of this filter is$instance
(instance of the current WC_Product class). Why did not you use it to get a product ID?I use a method
get_price_html()
inside Ajax request directly on a WC_Product object (outside WordPress Loop) and a functionget_the_ID()
does not work.Links:
get_price_html method
woocommerce_get_price_html filterAny help appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with woocommerce_get_price_html filter’ is closed to new replies.