Method ‘show allergen with id’ doesn’t return result
-
Hello and thank you for your wonderful plugin. It suits my needs perfectly.
I’m trying to show the allergens in the woocommerce category block. It doesn’t use a hook so I have to override its content ??
I try to do this using the method
allergens_list_910_show_allergen_with_id
, as it is used in hooks.php: there’s a line that says
$html = allergens_list_910_show_allergen_with_id($product_id);
…but it doesn’t work, simply because in the method, the result $html isn’t returned but “echoed”:
$html = apply_filters('allergens_list_modify_display', $html); echo $html;
I believe that it should be
return $html;
. Then the method works! And I believe the shortcode doesn’t work because of this reason as well…I’d modify it myself and submit a pull request, but the code is in svn, not git and I don’t have any svn client set up anymore, hence this support ticket
I hope this suggestion is an improvement.
Kind regards!
- The topic ‘Method ‘show allergen with id’ doesn’t return result’ is closed to new replies.