You can filter the class applied to each product extra field, just use the pewc_filter_single_product_classes
filter:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Filter field classes | |
*/ | |
function prefix_filter_single_product_classes( $classes, $item ) { | |
$classes[] = 'my-class-name'; | |
// You can also use $item to check the field ID and add classes conditionally | |
return $classes; | |
} | |
add_filter( 'pewc_filter_single_product_classes', 'prefix_filter_single_product_classes', 10, 2 ); |
The filter also passes the $item
object so you can do conditional stuff based on the item.