Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] xprofile_data_after_save hook not working

  • Avatar of 3cees
    3cees
    Participant

    @3cees

    Hi,

    I want to use the hook `xprofile_data_after_save` for a custom function.
    I tried it with my function and it did not work. So I wrote a test function, to check, if the hook works.
    `function er_copy_user_data($xprofile){
    wp_die(‘hooked’);
    }

    add_action( ‘xprofile_data_after_save’, ‘er_copy_user_data’ );`

    This code is in my functions.php.

    Wp is not dying. The message is not shown. BP is up 2 date.

    What could be the issue?

    Thanks,
    Lars

Viewing 3 replies - 1 through 3 (of 3 total)
  • Avatar of 3cees
    3cees
    Participant

    @3cees

    No one here that can help me with that, or who ever had a similar problem?

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    To test if the hook works, use wp_redirect instead of die and send it to another site like google.

    Avatar of 3cees
    3cees
    Participant

    @3cees

    I found the error. The profile data were not saved correctly. I got no error message. So the hook wasn’t fired.

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.