Last active
February 19, 2016 17:18
-
-
Save mikeyarce/45cdc0e239f3f68ea4b6 to your computer and use it in GitHub Desktop.
Variations and Colour Swatches custom class or ID
This file contains hidden or 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
| // change output $args in variation swatches | |
| function change_class_or_id( $args ) { | |
| $args = array( | |
| 'options' => false, | |
| 'attribute' => false, | |
| 'product' => false, | |
| 'selected' => false, | |
| 'name' => '', | |
| 'id' => 'testyyy', | |
| 'class' => 'test', | |
| 'show_option_none' => __( 'Choose an option', 'woocommerce' ) | |
| ); | |
| return $args; | |
| } | |
| add_filter( 'woocommerce_dropdown_variation_attribute_options_args', 'change_class_or_id' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment