Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

[Support request] Hook swpm_after_login not working with Simple Membership After Login Redirection

Simple Membership Plugin › Forums › Simple Membership Plugin › Hook swpm_after_login not working with Simple Membership After Login Redirection

  • This topic has 4 replies, 3 voices, and was last updated 5 years, 2 months ago by smythsys.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • July 14, 2021 at 4:23 pm #22832
    smythsys
    Participant

    Hi,
    we have been asked to execute a Google Tag Manager event when someone logs into our site, or when they register, and send user data.

    I was doing tests with the login sequence, using swpm_after_login, and was getting no result.

    After some research I found https://simple-membership-plugin.com/forums/search/swpm_after_login/ where it said that the hook was not being fired when the plugin Simple Membership After Login Redirection was active. So I deactivated it and got it to work.

    But we do need that plugin as our users need to be redirected to webpages depending on their role.

    Which hook can I use for this task with the plugin enabled?

    Data: Simple Membership After Login Redirection V 1.4
    WordPress Simple Membership 4.05
    Simple Membership Custom Messages
    Simple Membership Form Builder
    Simple Membership Google recaptcha
    being used.

    Thanks in advance.

    July 15, 2021 at 10:04 pm #22834
    mbrsolution
    Moderator

    Hi,

    I am just wondering if you have read the following documentation?

    https://simple-membership-plugin.com/configure-login-redirection-members/

    Thank you.

    July 16, 2021 at 7:15 pm #22835
    smythsys
    Participant

    Sorry if I am missing something but I fail to see how this is related to our issue. Login redirection is working. What is not working is the swpm_after_login hook once the plugin “Simple Membership After Login Redirection”.
    We need to execute a GTM action after a member logs in and don’t have a hook if that is not working.

    July 17, 2021 at 2:50 am #22836
    admin
    Keymaster

    That action hook is working fine. I tested it myself again just to verify it. That action hook gets triggered when the SWPM plugin has processed the login authentication. That hook DOES NOT get triggered after the login redirection.

    It is likely that you are wanting a NEW hook to be triggered AFTER the redirection. But the plugin can’t trigger a hook after the user goes to a NEW URL. When you want to do/manage your own redirection, you need to override the redirection completely (instead of trying to use that addon and doing your own custom redirection on top of that). You can’t do half and half with this.

    Another possibility is that you need a NEW action hook to be triggered from the After login redirection addon. You can suggest what action hook should be added and where in that addon. Send us the suggested code modification for that addon and we will look at incorporating that into the addon. We are always open to adding new action or filter hooks to the plugin or an addon.

    Please note that any PHP coding related things fall under customization and are beyond the scope of free support. You are free to do whatever customization you want to do but we won’t be able to offer free support to troubleshoot customization/coding related things for your project:
    https://simple-membership-plugin.com/message-from-the-simple-membership-team/

    July 18, 2021 at 8:00 pm #22838
    smythsys
    Participant

    Ok….maybe I wasn’t getting the result but the hook was being triggerd. I’ve done the script and will ask they SEO guys to see if they see the results in Analytics.
    Thanks for the help.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy