Commit ba65712d authored by Franco nextime Lanza's avatar Franco nextime Lanza

Make select case to work with the first option as default

parent e3aaac5b
......@@ -6,12 +6,6 @@ $current_value = isset( $_POST['addon-' . sanitize_title( $addon['field-name'] )
<p class="form-row form-row-wide addon-wrap-<?php echo sanitize_title( $addon['field-name'] ); ?>">
<select class="addon addon-select" name="addon-<?php echo sanitize_title( $addon['field-name'] ); ?>">
<?php if ( ! isset( $addon['required'] ) ) : ?>
<option value=""><?php _e('None', 'wc_product_addons'); ?></option>
<?php else : ?>
<option value=""><?php _e('Select an option...', 'wc_product_addons'); ?></option>
<?php endif; ?>
<?php foreach ( $addon['options'] as $option ) :
$loop ++;
$price = $option['price'] > 0 ? ' (' . woocommerce_price( $option['price'] ) . ')' : '';
......@@ -20,4 +14,4 @@ $current_value = isset( $_POST['addon-' . sanitize_title( $addon['field-name'] )
<?php endforeach; ?>
</select>
</p>
\ No newline at end of file
</p>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment