php - What is wrong with the way I am passing arguments to get_tags()? -
this bit of code has been giving me problem. here's snippet in question:
... strip_tags($product->get_tags(array('order', 'desc'))) ...
which should produce reverse alphabetical list of tags product, however, entirely different comes on front-end. while get_tags() work without arguments, add argument produces error.
following commenter's suggestion of using this:
strip_tags($product->get_tags(array('order' => 'desc')))
produces this:
if talking wc_product
class , get_tags()
method function definition is:
function get_tags( $sep = ', ', $before = '', $after = '' )
it returns list of term links ( in fact, returns get_the_term_list() list ).
Comments
Post a Comment