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 );
?></p>
<p class="form-row form-row-full">
<?php if ( wc_tax_enabled() ) : ?>
<label><?php _e( 'Tax class:', 'woocommerce' ); ?></label>
<select name="variable_tax_class[<?php echo $loop; ?>]">
<option value="parent" <?php selected( is_null( $_tax_class ), true ); ?>><?php _e( 'Same as parent', 'woocommerce' ); ?></option>
<?php
foreach ( $parent_data['tax_class_options'] as $key => $value )
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>';
?></select>
<?php endif; ?>
</p>
<?php if ( wc_tax_enabled() ) : ?>
<p class="form-row form-row-full">
<label><?php _e( 'Tax class:', 'woocommerce' ); ?></label>
<select name="variable_tax_class[<?php echo $loop; ?>]">
<option value="parent" <?php selected( is_null( $_tax_class ), true ); ?>><?php _e( 'Same as parent', 'woocommerce' ); ?></option>
<?php
foreach ( $parent_data['tax_class_options'] as $key => $value )
echo '<option value="' . esc_attr( $key ) . '" ' . selected( $key === $_tax_class, true, false ) . '>' . esc_html( $value ) . '</option>';
?></select>
</p>
<?php endif; ?>
<p class="form-row form-row-full">
<label><?php _e( 'Variation Description:', 'woocommerce' ); ?></label>