Custom usermeta fields are not updated

[ad_1]

Are you sure it is metadata from the usermeta table?

yes. this is a screen of my db.

function sbc_save_custom_fields($user_id) {
    if (!current_user_can('edit_user', $user_id)) {
        return false;
    }
    update_user_meta($user_id, 'badge_number', $_POST['badge_number']);
    update_user_meta($user_id, 'user_class', $_POST['user_class']);
    update_user_meta($user_id, 'user_address', $_POST['user_address']);
    update_user_meta($user_id, 'user_address2', $_POST['user_address2']);
    update_user_meta($user_id, 'user_postcode', $_POST['user_postcode']);
    update_user_meta($user_id, 'user_city', $_POST['user_city']);
    update_user_meta($user_id, 'user_phone', $_POST['user_phone']);
    update_user_meta($user_id, 'user_birth_year', $_POST['user_birth_year']);
    update_user_meta($user_id, 'user_gender', $_POST['user_gender']);
}

I use this code to create custom fields.

Anyway, thank you so much for your support and for your plugin.

  • This reply was modified 1 hour, 9 minutes ago by ignition3d.

So if you use user_address for example as column it should work.

if you have any problems try deactivating everything except this plugin and see how it works.

It’s something really basic and I don’t see where it can be a problem.

yes… I also find it very strange. the file I’m importing is the correct one with the new data. there is no cache problem. it’s very strange.

is not updating any data

  • This reply was modified 49 minutes ago by ignition3d.

Really strange. Try with only one row.

Anyway… from here I cannot do much more sorry.

very strange. I changed the path of the file to import. now it updates the data correctly.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer