diff --git a/includes/wc-attribute-functions.php b/includes/wc-attribute-functions.php index 423dfd5e4c9..980d03ea790 100644 --- a/includes/wc-attribute-functions.php +++ b/includes/wc-attribute-functions.php @@ -331,5 +331,6 @@ function wc_attributes_array_filter_variation( $attribute ) { * @return bool */ function wc_is_attribute_in_product_name( $attribute, $name ) { - return stristr( $name, ' ' . $attribute . ',' ) || 0 === stripos( strrev( $name ), strrev( ' ' . $attribute ) ); + $is_in_name = stristr( $name, ' ' . $attribute . ',' ) || 0 === stripos( strrev( $name ), strrev( ' ' . $attribute ) ); + return apply_filters( 'wc_is_attribute_in_product_name', $is_in_name, $attribute, $name ); }