getCategories(); } //Save data if(isset($_POST['action']) and sanitize_text_field($_POST['action']) == 'save_profile') { $categories_recibed = implode(",", array_map('sanitize_text_field', $_POST['tax_input']['product_cat'])); $acounts_recibed = implode(",", array_map('sanitize_text_field', $_POST['profile'])); // die(var_dump($categories_recibed)); if($_POST['description'] == '') { echo "

Profile need description

"; }else{ $saveProfile = MiraviaCore::add_profile(array( 'name' => sanitize_text_field($_POST['description']), 'accounts_id' => $acounts_recibed, 'categories' => $categories_recibed, 'miravia_category' => sanitize_text_field($_POST['miravia_category']) )); if($saveProfile) { wp_safe_redirect(admin_url("admin.php?page=miravia_settings&subpage=edit_profile&action=edit&id={$saveProfile}")); } } } ?>

Create new profile


Categories Select the categories with this profile
    'product_cat' ));?>
Miravia Category
Seller Accounts {$profile['name']}

"; } ?>