| @@ 38-40 (lines=3) @@ | ||
| 35 | );  | 
                                |
| 36 | $all_terms = get_terms( $taxonomy, apply_filters( 'woocommerce_product_attribute_terms', $args ) );  | 
                                |
| 37 | 									if ( $all_terms ) { | 
                                |
| 38 | 										foreach ( $all_terms as $term ) { | 
                                |
| 39 | echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( has_term( absint( $term->term_id ), $taxonomy, $thepostid ), true, false ) . '>' . esc_attr( apply_filters( 'woocommerce_product_attribute_term_name', $term->name, $term ) ) . '</option>';  | 
                                |
| 40 | }  | 
                                |
| 41 | }  | 
                                |
| 42 | ?>  | 
                                |
| 43 | </select>  | 
                                |
| @@ 2151-2155 (lines=5) @@ | ||
| 2148 | // Get terms if this is a taxonomy - ordered. We need the names too.  | 
                                |
| 2149 | $terms = wc_get_product_terms( $product->id, $attribute, array( 'fields' => 'all' ) );  | 
                                |
| 2150 | ||
| 2151 | 				foreach ( $terms as $term ) { | 
                                |
| 2152 | 					if ( in_array( $term->slug, $options ) ) { | 
                                |
| 2153 | $html .= '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args['selected'] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';  | 
                                |
| 2154 | }  | 
                                |
| 2155 | }  | 
                                |
| 2156 | 			} else { | 
                                |
| 2157 | 				foreach ( $options as $option ) { | 
                                |
| 2158 | // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.  | 
                                |