wp_login
is fired in wp_signon
after the user has successfully logged in.
That’s after submitting the login form, so obviously you can’t execute any JavaScript there. Of course you can still do something in PHP.
If you want to execute JavaScript after login, you need to find another hook.
Related Posts:
- When can you get current page ID and initialize hooks right after?
- WordPress admin notice in plugin function
- Using the ‘draft_to_publish’ hook (post status transition)
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- Is it possible to add an action to the currently running action?
- How to prevent action in ajax request, when in admin side?
- template_redirect not being called when using ajax
- What are the benefit in adding hook in the init() hook?
- add_action in functions.php, do_action in plugin?
- add action for displaying posts using a shortcode
- Any hook for pre-plugin-update -either bulk or single plugin update
- How to get all of the activate_plugin action parameters?
- Get Time Taken By Each Action Hook in WordPress
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Hook for page Request?
- I cannot include a file in my plugin settings page
- The function called on the wp head hook becomes null
- Passing function into add_action always returns the first argument
- Plugin Hook: Get posts
- How wordpress plugin hooks works? [duplicate]
- How can I edit post data before it is saved?
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How to only hook on Single.php after content?
- How to stop showing admin notice after close button has been clicked
- How to save the values of checkbox to the register setting?
- Is there any record of installed plugins in the database?
- Edit plugin without hooks in functions.php
- How can I log a user out of WordPress before the page loads?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- Shortcode display outside the div
- Pass A Value From Outside To A Plugin Variable
- Built in admin ajax hooks?
- do_action and hook methods
- How to register custom post types in a plugin?
- Action on post publish
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- How to add inline css/js inside a shortcode
- Determine plugin name from within plugin_action_links filter
- How could I execute my plugin just in frontend (not in backend)
- Placement of Code in Plugin for hooking `save_post`
- Custom height/width for thickbox in WP Backend
- add action wp_head not working
- Hide Theme options and Customize Admin menu
- Can I use a method from an existing plugin as an action hook?
- Where to hook my plugin’s action
- How to pull code snippet from functionality plugin?
- How do action and filter hooks understand where to look for the core function that we hooked our function to them
- wordpress plugin is not activating from widget
- When to load auto-login code?
- Using a post-signup hook to get user details
- Create tabs in admin options page from custom post type loop
- do_action() hook into load-(page)
- Howto check version of another plugin and then add a submenu page to it
- Submit Form data to another page via Ajax (WordPress Way)
- Why do plugins often ask to add in to templates?
- Does using `add_action( ‘init’…` cause performance issues?
- remove_action not removing add_action from constructor
- How to get menu location in wp_update_nav_menu hook
- Display Plugin Panels Outside of Admin Areas
- Are there action hooks for comments?
- WooCommerce: after install hook
- Save user total active time after login in wordpress [closed]
- WordPress Site is Broken, Cannot see wp-admin page [closed]
- Advanced WordPress plugin activation detection
- wp_loaded with static Singleton
- How to remove a CPT Menu from the Root Admin only
- is it possible to hook every page style?
- Add action to custom Function
- How to use add_action for multiple instances of the same class
- How to hook into action/filter call
- using wp_footer hook in a plugin
- How to automatically activate users after registration without activation email?
- Add hook after content without formatting
- admin_post hook not firing function inside class
- Why do actions with class and public method don’t fire __construct()
- How to properly enqueue jQuery knob on WordPress without conflict?
- Hooking into the HTML header container
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Admin menu hilighting wrong item for CPT
- Is admin section completely customizable in terms of styling?
- Remove action added in plugin class from theme
- {status}_{post_type} does not run correctly?
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Passing a parameter to filter and action functions
- Run only on plug-in activation instead of wp_head
- Display_rows() and column_cb() strange behaviour
- Is it possible to cancel a post status transition?
- OOP Plugin: Where should I place the action hooks in the class?
- add query string to all pages after user logged in
- Post curl function save twice using plugin hook function wordpress
- Combining JS files to one script
- Hook automatic_updates_complete to autoupdate plugin
- Suitable hook when creating, updating and deleting posts programmatically
- The Admin page isn’t showing in the sidebar of the dashboard
- Why is my activator class adding the files/running the actions I add?
- warning wp session
- is_user_logged_in() undefined at shutdown in plugin context
- Submitting form to admin-post.php WordPress