Merge pull request #2093 from franticpsyx/master
Hooks for consistency between variation-admin-html.php and writepanel-product-type-variable.php
This commit is contained in:
commit
0161ceb939
|
@ -212,11 +212,11 @@ function variable_product_type_options() {
|
||||||
if ( $attribute['is_taxonomy'] ) {
|
if ( $attribute['is_taxonomy'] ) {
|
||||||
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
|
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
|
||||||
foreach ( $post_terms as $term )
|
foreach ( $post_terms as $term )
|
||||||
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . esc_html( $term->name ) . '</option>';
|
echo '<option ' . selected( $variation_selected_value, $term->slug, false ) . ' value="' . esc_attr( $term->slug ) . '">' . apply_filters( 'woocommerce_variation_option_name', esc_html( $term->name ) ) . '</option>';
|
||||||
} else {
|
} else {
|
||||||
$options = explode( '|', $attribute['value'] );
|
$options = explode( '|', $attribute['value'] );
|
||||||
foreach ( $options as $option )
|
foreach ( $options as $option )
|
||||||
echo '<option ' . selected( $variation_selected_value, $option, false ) . ' value="' . esc_attr( $option ) . '">' . ucfirst( esc_html( $option ) ) . '</option>';
|
echo '<option ' . selected( $variation_selected_value, $option, false ) . ' value="' . esc_attr( $option ) . '">' . ucfirst( apply_filters( 'woocommerce_variation_option_name', esc_html( $option ) ) ) . '</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '</select>';
|
echo '</select>';
|
||||||
|
|
Loading…
Reference in New Issue