Hooks for consistancy with writepanel-product-type-variable.php

writepanel-product-type-variable.php already allows filtering the
variation dropdown descriptions in metaboxes. No hook exists here to
take care of the Default Selections dropdown.
This commit is contained in:
Manos Psychogyiopoulos 2012-12-30 14:00:37 +02:00
parent 4988e0f444
commit c7c15fa856
1 changed files with 2 additions and 2 deletions

View File

@ -212,11 +212,11 @@ function variable_product_type_options() {
if ( $attribute['is_taxonomy'] ) {
$post_terms = wp_get_post_terms( $post->ID, $attribute['name'] );
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 {
$options = explode( '|', $attribute['value'] );
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>';