From 0dfc1ad58b20869e2b0b7262ec93fb4787bcb34a Mon Sep 17 00:00:00 2001 From: Tomasz Tunik Date: Wed, 15 Jun 2022 11:37:21 +0200 Subject: [PATCH] provide span wrapper for category list item name (https://github.com/woocommerce/woocommerce-blocks/pull/6574) will enable adding text overflow of other effects that user might not want to interfere with the image element --- .../src/BlockTypes/ProductCategories.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductCategories.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductCategories.php index a432ac87256..1cb07d2782e 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductCategories.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductCategories.php @@ -322,9 +322,12 @@ class ProductCategories extends AbstractDynamicBlock { foreach ( $categories as $category ) { $output .= '
  • - ' . $this->get_image_html( $category, $attributes ) . esc_html( $category->name ) . ' - ' . $this->getCount( $category, $attributes ) . ' - ' . ( ! empty( $category->children ) ? $this->renderList( $category->children, $attributes, $uid, $depth + 1 ) : '' ) . ' + ' + . $this->get_image_html( $category, $attributes ) + . '' . esc_html( $category->name ) . '' + . '' + . $this->getCount( $category, $attributes ) + . ( ! empty( $category->children ) ? $this->renderList( $category->children, $attributes, $uid, $depth + 1 ) : '' ) . '
  • '; }