term_id, "_miravia_attr", sanitize_text_field($_POST['attr'])); } $miravia_category = get_term_meta($category->term_id, '_miravia_category', true); $token = MiraviaCore::get_miravia_account_default(); if($token) { $token = $token['token']; }else{ die('Error: Account is not ready'); } $link = new MiraviaCategory($token); $attributes = $link->getAttributes($miravia_category); $default_attributes = get_term_meta($category->term_id, "_miravia_attr", true); $attributes_woocommerce = wp_list_pluck( wc_get_attribute_taxonomies(), 'attribute_label', 'attribute_name' ); ?>

MIRAVIA - Attributes name ?> Configuration

$attr) { // if(isset($default_attributes[$attr['name']])) { // $value = $default_attributes[$attr['name']]; // }else{ // $value = ''; // } // $obligatorio = ''; // if($attr['is_mandatory'] == '1') { // $obligatorio = '*'; // } $options = ''; if (!empty ($attributes ) ) { foreach ( $attributes as $key => $v ) { if($v['is_sale_prop'] == 0) { continue; } $selected = ''; if($default_attributes != '' and $v['name'] == $default_attributes[$slug]) { $selected = 'selected="selected"'; } $options .= ""; } } echo wp_kses("", wp_kses_allowed_html()); } echo wp_kses("",wp_kses_allowed_html()); }else{ echo esc_html('No hay atributos en el id ' . $category->term_id); } ?>
{$attr}