#: '; // Get terms for attribute taxonomy or value if its a custom attribute if ( $attribute['is_taxonomy'] ) { $post_terms = wp_get_post_terms( $parent_data['id'], $attribute['name'] ); foreach ( $post_terms as $term ) { echo ''; } } else { $options = wc_get_text_attributes( $attribute['value'] ); foreach ( $options as $option ) { $selected = sanitize_title( $variation_selected_value ) === $variation_selected_value ? selected( $variation_selected_value, sanitize_title( $option ), false ) : selected( $variation_selected_value, $option, false ); echo ''; } } echo ''; } ?>