Update user meta after creating a Relationship

Support MB Relationships Update user meta after creating a RelationshipResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15371
    mzykinmzykin
    Participant

    Hi,

    Is there a way to update user meta data after creating (or deleting) a relationship? I'm specifically creating user to post relationships, but would also find this useful for user-to-user relationships.

    #15381
    Anh TranAnh Tran
    Keymaster

    Hi, you can use the hook rwmb_after_save_post to update the user meta after a post/user is updated.

    #15392
    mzykinmzykin
    Participant

    Hi Anh, thanks so much for the response. I ended up hooking into the save_post action to add user meta for each relationship created. On the user's end, I hooked into profile_personal_options (if editing own profile) and personal_options (if editing someone else's profile) to add the user meta.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.