This is because there is no meta key named display_name, so if you want to update a single meta value better use update_user_meta
instead of wp_update_user
, as update_user_meta() will create the meta field if it doesn’t exist.
like
if ( !empty( $_POST['display_name'] ) ) {
update_user_meta( $current_user->ID, 'display_name', esc_attr( $_POST['display_name'] ) );
}
Then you can use the meta key and value the way you want.
Related Posts:
- Where the Nickname is being used in WordPress
- Building a scalable WordPress favouriting plugin – one serialised meta value array or many meta records
- How to add usermeta to “Notice of Email Change” email message
- How to get user-meta from Social Login registered users?
- delete_user_meta Delete one value out of array
- Upload files programmatically to users
- Displaying a Welcome Message to a Woocommerce User
- update_user_meta add value on the top on existing value
- Set user ID at time of wp_create_user
- I’m trying to update user meta but is always 1, What I doing wrong? [closed]
- Average Account Age
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- Modifying Author Link to add Author Meta in URL
- update_user_meta() misfires sometimes
- Shortcode to update user meta
- Search users with custom meta data
- Add user meta after a user has registered and logged In [closed]
- WordPress /users/me endpoint request forbidden
- Linking form to user meta fields
- Auto populate a user custom field from another user custom field
- Get user edit functions in frontend for site admin
- User updating their profile wipes my custom fields
- How To Export User’s Custom Fields in CSV or XLSX
- Get all user meta_keys and then group users by matching values
- Modifying meta keys in User Meta Pro using user_meta_pre_user_register not working
- How to use get_user_by in plugin
- Confusing problem with displaying message recipient metadata
- Need help getting a certain value out of a multi dimensional array
- How to delete only user meta value (not key) from usermeta table in wordpress?
- How to delete user meta by key
- Getting label name of extra user fields
- When unit testing a plugin, does the plugin need to be in the wp-content/plugins directory of the WordPress tests install?
- WordPress sharding: which multi-DB plugin to use?
- Need to create a Theme demo site that features multiple themes
- Is there a plugin to show the code tag button on the visual editor?
- Do Plugins effect site loading time?
- Adding Featured Image in Post List
- How do I check what plugins are enabled via the database?
- Posts wont expire
- Should I use RIPS tool to test my themes and plugins?
- Add Top-Level Menu that opens URL
- How Restrict access to admin dashboard by specific static ip?
- action-scheduler vs wp-background-processing
- How to get images from EDD post?
- Popup Cookie WordPress select language and section (Elementor)
- Remove filter from WordPress Plugin
- Will Flutter work with WordPress 3.0?
- Function to see how many plugins on a site need updating
- How to make an interface similar to multi-site for switching between multiple (single) sites for administrators?
- Call to undefined function get_userdata in user.php
- Only Homepage not loading properly
- AJAX search posts and pages
- Combine scripts from all extensions of the plugin when an extension is activated
- Access WordPress data from external PHP application.
- Checkbox conflict in my custom plugin admin page
- How do post a Photo to Facebook when a post is published? [closed]
- How to display number of page views on a post?
- What is a reasonable memory limit for WordPress
- Get plugin download URL from slug
- Using add_action before add_filter on a plugin?
- How can a wordpress plugin generate pages without posts?
- Calling the_excerpt from inside a plugin template file
- How to multiply a post to test internal search results?
- Product count in archive page Title in WooCommerce [closed]
- 5 PHP Fatal error: Uncaught ArgumentCountError (Cannot Find)
- Customize Menu | Styling LESS/SCSS code formats
- Plugin option default value
- Posts 2 Posts: Display custom types connected to the same other custom type but with another connection
- Post via git repository
- restrict subscribers to admin area. They have their own profile on fron-end
- Woocommerce Export and import Orders
- How to get the custom field value using SQL query
- Add a Custom email notification to WC actions
- specific rows style for in custom list table using WP_List_Table
- Conditionally load public and admin code with AJAX working on both sides
- Disabling drift plugin from homepage
- return bbp_get_topic_author_id as integer
- Modify function output in a plugin
- Why can’t I call a function from inside my registered AJAX function?
- Problem in functions.php file
- I want add repository theme folder
- Quick Edit in custom posts no show columns after save
- How to hide the form after successful php execution
- Change default url to plugin custom post type
- Site is continuously accessing by several IPs
- Moving to WordPress Premium versus a hosting provider
- Is there a way to upload an external folder in WordPress?
- how to sort results by last day update at search result in plugin installer?
- User specific content (posts) / limiting visibility
- Carrying information from button click into form [closed]
- ajax sends data to plugin
- Making a Custom Post Type Publish Loop
- WordPress Plugin: Demon Image Annotation
- Facebook like plugin with Multi Option-Needed [closed]
- Someone Comment 1000 times in a Day in My WordPress Site, What Can i Do
- How can I make a quotation engine like this website in WooCommerce?
- Function not being called on form submit, only blank admin-post.php page
- 404 Error on a WordPress Website, Error disappears for a while and again appears
- ShipStation WooCommerce Integration error
- Failed to update a post when I add a taxonomy to it