From 98a1ae4b25d1a87f78c9a1f6313bc9e9f0f121e3 Mon Sep 17 00:00:00 2001 From: Ninos Ego Date: Tue, 11 Aug 2015 13:17:52 +0200 Subject: [PATCH] Add class arg to dropdown function --- includes/wc-template-functions.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php index 7d6926926c2..ef3db1e6593 100644 --- a/includes/wc-template-functions.php +++ b/includes/wc-template-functions.php @@ -1911,6 +1911,7 @@ if ( ! function_exists( 'wc_dropdown_variation_attribute_options' ) ) { 'selected' => false, 'name' => '', 'id' => '', + 'class' => '', 'show_option_none' => __( 'Choose an option', 'woocommerce' ) ) ); @@ -1919,13 +1920,14 @@ if ( ! function_exists( 'wc_dropdown_variation_attribute_options' ) ) { $attribute = $args['attribute']; $name = $args['name'] ? $args['name'] : 'attribute_' . sanitize_title( $attribute ); $id = $args['id'] ? $args['id'] : sanitize_title( $attribute ); + $class = $args['class']; if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute ) ) { $attributes = $product->get_variation_attributes(); $options = $attributes[ $attribute ]; } - echo ''; if ( $args['show_option_none'] ) { echo '';