Custom Fields
Re-Envisioned
Support MB Relationships Update user meta after creating a Relationship

  • Creator
    Topic
  • #15371
    Resolved mzykin
    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #15381
    Anh Tran
    Keymaster

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

    #15392
    mzykin
    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 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.