| @@ -87,8 +87,15 @@ | ||
| 87 | 87 | public function frontend_display_swatch( $term_html, $link_attributes, $term_object, $filter ) { |
| 88 | 88 | |
| 89 | 89 | $taxonomies = flrt_get_experimental_option( 'color_swatches_taxonomies', [] ); |
| 90 | 90 | |
| 91 | + // A brand term already rendered with its brand logo (wpc_term_brand_logo, | |
| 92 | + // priority 5) must keep it — rebuilding here would replace the logo | |
| 93 | + // markup with a swatch square | |
| 94 | + if ( in_array( $filter['e_name'], flrt_brand_filter_entities() ) && flrt_get_term_brand_image( $term_object->term_id, $filter ) ) { | |
| 95 | + return $term_html; | |
| 96 | + } | |
| 97 | + | |
| 91 | 98 | if ( in_array( $filter['e_name'], $taxonomies ) ) { |
| 92 | 99 | |
| 93 | 100 | $image_src = flrt_get_term_swatch_image( $term_object->term_id, $filter ); |
| 94 | 101 | $wrapper_class = ''; |