Extra classes filter bug
-
Using WooCommerce with FSE theme/blocks, the inputs need to use
input-textclass, so I went looking to see if I was able to add this class to the fields.There is a
wapf/field_classes/{$field->key}filter available, but it’s being applied to both the container AND the input. I believe thatHtml::field_container_classes()should usewapf/field_container_classes/{$field->key}instead, that wayinput-textwon’t be applied to both resulting in wrong styling.Also,
$field->keyseems to beNULL, and not assigned anywhere in the plugin, so it doesn’t make sense to use in the filter name. I believe simply usingwapf/field_classeswould be great, but it should also pass the reference to the$fieldvariable (apply_filters('wapf/field_classes, [], $field)) as this would allow developers to check what field type is being filtered, etc.
The topic ‘Extra classes filter bug’ is closed to new replies.