Reputation: 1044
This bit of code has been giving me a problem. Here's the snippet in question:
... strip_tags($product->get_tags(array('order', 'DESC'))) ...
Which should produce a reverse alphabetical list of tags from the product, however, something entirely different comes up on the front-end. While get_tags() does work without arguments, as soon as I add any argument it produces this error.
Following a commenter's suggestion of using this:
strip_tags($product->get_tags(array('order' => 'DESC')))
Produces this:
Upvotes: 1
Views: 134
Reputation: 12709
If you are talking about WC_Product
class and get_tags()
method then function definition is:
function get_tags( $sep = ', ', $before = '', $after = '' )
It returns list of term links ( in fact, just returns get_the_term_list() list ).
Upvotes: 1