• Resolved semafor

    (@semafor)


    I can’t get the hook swpm_front_end_profile_edited to function. I have also testest other hooks reportet in the documentation ”Simple Membership – Action Hooks Reference” without success.

    But I have found another action hook, swpm_before_login_form_widget. It is not mentioned in the documentation but works. See below.

    Does anyone have a suggestion on how I can get the hook to work?

    C:\xampp\htdocs\wordpress\wp-content\themes\twentytwentythree-child\functions.php

    <?php

    //This hook is triggered after a member updates their profile from the Edit Profile page, and the plugin has finished processing the changes.
    function after_profile_edit_callback($member_info){
        //Do stuff
        echo 'Hello';
        print_r($member_info);//Lets see what info is in this array.
    }
    add_action('swpm_front_end_profile_edited', 'after_profile_edit_callback');
    //NOT WORKING


    function before_login(){
        //Do stuff
        echo 'Innan inloggning';
    }
    add_action('swpm_before_login_form_widget', 'before_login');
    //WORKING
Viewing 1 replies (of 1 total)
  • Plugin Author wp.insider

    (@wpinsider-1)

    The wpm_front_end_profile_edited hook is a valid and functioning action hook. If your custom code isn’t capturing the hook, it’s often because the code isn’t registered early enough in the WordPress loading process.

    For example, if this hook is triggered during the init phase, but your code resides in a file that’s loaded later (after init has already fired), then your function won’t be registered in time to catch the hook. Keep in mind that different hooks are fired at different stages of the page load, so correct placement and timing are essential.

    Using action hooks effectively does require some developer-level understanding of how WordPress loads and executes code.

    Unfortunately, that type of customization/coding related troubleshooting falls outside the scope of this free support forum.

    The Simple Membership plugin is designed to offer a straightforward membership solution out of the box. If your project requires advanced custom behavior, you may consider hiring a developer for assistance. Alternatively, we offer paid support for more in-depth help, which you can explore here:

    https://simple-membership-plugin.com/paid-support-simple-membership-plugin/

Viewing 1 replies (of 1 total)

The topic ‘Hook problem’ is closed to new replies.