Move tax enabled check

This commit is contained in:
Mike Jolley 2015-05-29 14:55:54 +01:00
parent b2711f3d64
commit 0a3defd798
2 changed files with 13 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -175,17 +175,18 @@ extract( $variation_data );
echo wp_dropdown_categories( $args ); echo wp_dropdown_categories( $args );
?></p> ?></p>
<p class="form-row form-row-full">
<?php if ( wc_tax_enabled() ) : ?> <?php if ( wc_tax_enabled() ) : ?>
<label><?php _e( 'Tax class:', 'woocommerce' ); ?></label> <p class="form-row form-row-full">
<select name="variable_tax_class[<?php echo $loop; ?>]"> <label><?php _e( 'Tax class:', 'woocommerce' ); ?></label>
<option value="parent" <?php selected( is_null( $_tax_class ), true ); ?>><?php _e( 'Same as parent', 'woocommerce' ); ?></option> <select name="variable_tax_class[<?php echo $loop; ?>]">
<?php <option value="parent" <?php selected( is_null( $_tax_class ), true ); ?>><?php _e( 'Same as parent', 'woocommerce' ); ?></option>
foreach ( $parent_data['tax_class_options'] as $key => $value ) <?php
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>'; foreach ( $parent_data['tax_class_options'] as $key => $value )
?></select> echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>';
<?php endif; ?> ?></select>
</p> </p>
<?php endif; ?>
<p class="form-row form-row-full"> <p class="form-row form-row-full">
<label><?php _e( 'Variation Description:', 'woocommerce' ); ?></label> <label><?php _e( 'Variation Description:', 'woocommerce' ); ?></label>