Ability to modify product_category html before rendering
-
Not possible to extend product_category description using hooks.
My use case – I have additional field in my product_category page (description field before shop and one additional description after). I want to combine them in TOC.
Currently script overrides content value before processing, but gives no chance to modify it (i.e. append data from separate field).
if(function_exists('is_product_category') && is_product_category()){ $term_object = get_queried_object(); if(!empty($term_object->description)){ $content = $term_object->description; } }Something like that would be better:
if(function_exists('is_product_category') && is_product_category()){ $term_object = get_queried_object(); if($term_object) { $content = apply_filters('ez_toc_modify_product_category_content',$term_object->description); } }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Ability to modify product_category html before rendering’ is closed to new replies.