You can add user meta after login by using the wp_login
hook. Make sure to set a higher priority (99 – the default is 10) to make sure to get the data after everything has processed in the core wp_signon()
function.
From the Codex …
function add_my_user_meta_after_login( $user_login, $user ) {
//Add my user meta code
}
add_action('wp_login', 'add_my_user_meta_after_login', 99, 2);
Related Posts:
- Where the Nickname is being used in WordPress
- How to hide fields from my user profiles
- WordPress logo upload option in theme panel
- Not getting author rank when using return
- Redirect to another page using contact form 7? [closed]
- how to display recent post by category on home page
- Get user edit functions in frontend for site admin
- How to delete only user meta value (not key) from usermeta table in wordpress?
- How to copy data from user profile page (profile.php) to theme customizer
- Between functions.php (theme), widgets, and plugins, which is loaded first?
- Is there any sort of theme dependency management?
- wp_enqueue_scripts not working in custom theme
- What is the correct way for a theme to support plugin UIs?
- How to call “page specific menu items” in template [closed]
- Create WooCommerce Product Category Programmatically
- How do I make my wordpress page more friendly for mobile viewers?
- login to wordpress with Get variables instead of Post
- Should I add sharing buttons using a plugin or directly in my theme files?
- Find out if request is for custom post type archive before query runs
- Should I use RIPS tool to test my themes and plugins?
- How to Build a Movie Library in WordPress 3.x
- Having separate plugins and themes folder for multi-site setup
- How can I get full attachment url from wp_get_attachment_metadata?
- unzip a folder on specific location and delete the zip file
- gallery option is not available in media upload box in costum theme option page
- Why are some of my thumbnails not being generated?
- Built in audio player?
- How to make first_name and last_name required fields in user profile?
- medoo framework in WP plugin
- Accessing GET variable named ‘error’
- Network: retrieve a list of latest posts
- How to upload user profile image from frontend in wordpress ?
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- AJAX search posts and pages
- Redirecting a buddyboss profile tab to a different tab if not subscribed to a specific membership
- wp_get_post_terms is difference obj model than the one in rest api response
- how to add a button next to the wordpress view button?
- Modifying Author Link to add Author Meta in URL
- Best place for short bio,image and button [closed]
- What are the specifics of WordPress development I need to know? [closed]
- WordPress shows error related to allow_url_fopen
- Can you use another Profile Builder shortcodes through advanced custom fields
- How to create a code editor for my plugin .?
- How to show only next post pagination link using wp_link_pages()
- How to create a custom shortcode based on the layout?
- wp_footer hook only working on homepage not in other pages
- ACF: post query, hide duplicate values [closed]
- Jquery NoConflict Problem
- How do I combine a theme with a plugin
- how to force tag page layout to use same as search layout?
- Great blogs site resources/tutorial for WordPress Developers? [closed]
- How to multiply a post to test internal search results?
- Use different single.php file based on condition
- how to connect the author profile with google webmaster tools in multiuser blog?
- Replacing global wp_query
- How can I support plugins in a custom theme?
- Redeclare function after plugin activation
- Woocommerce singe product custom gallery output works just on the first slide
- Remove Pagination for Product Category Pages WooCommerce
- How can I use my custom wordpress theme on two websites? [closed]
- Widget for specific category
- How to customize this theme? [closed]
- Don’t load the theme for a page FROM a plugin EDITED
- WordPress plugin with its own “site”/theme
- Seperate plugin and theme files
- Elementor Sidebar not loading when PRO elements plugin is active
- How would I get the new plugin version on this function?
- How to get a specific string from a url
- how to create user profile pages and display them based on users roles
- How to get checkbox by default true in metabox?
- WooCommerce Product Table – filter query on attributes
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- How to pass multiple custom fields as shortcode’s parameters
- Is it possible to custom set query for a WordPress REST API response?
- When the user entered an unauthorized url redirect to login page
- Which membership plugin enables users to enter html links in blogs and on their profile page?
- Show content from plugin on index
- How to use get_user_by in plugin
- Get plugin to background of page
- How to get author developer link on plugin page
- Shortcode in a blog post, footer and related products stop working
- How can i see/log all requests coming from a registration form (not from the UI)?
- w3 total cache and post__not_in
- Directory structure for plugin changes
- How to show post attachment image
- Advanced Custom Fields (ACF) Plugin – Random Image in Sidebar
- how do you point ‘screen_function’ to a function in the same class? [closed]
- Making a Custom Post Type Publish Loop
- How to generate a responsive output from plugin?
- How to work email subscribe in WordPress?
- How to create post comparison in wordpress
- Open graph issue on my theme
- Editing a theme
- Ajax button “Load more” is not loading correct language version posts for logged out users
- How to code a wordpress page properly? Dashboard or unique Theme files or alternative?
- how to make wordpress remember my choice
- Meta box not displaying on the plugin page
- Tips on using a custom template with Ultimate Member
- Getting error when accessing Customizer Page