add filter wc_is_attribute_in_product_name
The filter `wc_is_attribute_in_product_name` will allow customizations to show the variations in the cart like in WC 2.6.
This commit is contained in:
parent
e208e35e33
commit
7f6909040d
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue