Support

Account

Home Forums General Issues Insert Relationship field into user meta

Helping

Insert Relationship field into user meta

  • Hi all,

    I have a Custom Post Type called Subscribers in which I have a relationship field named Stores, I need to get that value and save it into a user I create from that Subscriber and add that field as meta.

    If I do the following

      
    $store = get_field('stores'); // stores field from CPT
    update_field('stores', $store, 'user_'.$new_userid); // update stores field of user
    

    The problem is that It gets saved in a different format. Serialized in a different way.

    Any help?
    Gracias!

  • Hi @portegno

    Could you please share the values of both stores from CPT and user in the database?

    Also, could you please share the JSON or XML export file of your field group so I can check your setup?

    Looking forward to your reply 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.