| @@ 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>  | 
                                |
| @@ 2085-2089 (lines=5) @@ | ||
| 2082 | // Get terms if this is a taxonomy - ordered. We need the names too.  | 
                                |
| 2083 | $terms = wc_get_product_terms( $product->id, $attribute, array( 'fields' => 'all' ) );  | 
                                |
| 2084 | ||
| 2085 | 				foreach ( $terms as $term ) { | 
                                |
| 2086 | 					if ( in_array( $term->slug, $options ) ) { | 
                                |
| 2087 | $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>';  | 
                                |
| 2088 | }  | 
                                |
| 2089 | }  | 
                                |
| 2090 | 			} else { | 
                                |
| 2091 | 				foreach ( $options as $option ) { | 
                                |
| 2092 | // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.  | 
                                |