Support

Account

Home Forums General Issues get_sub_field() after update_sub_field() – new data not returned

Unread

get_sub_field() after update_sub_field() – new data not returned

  • When I update_sub_field() and then get_sub_field() the new data is not returned.
    Is there a way to force a new postmeta query?

    My pseudo code:

    1. Loop through sub fields of a Repeater field
    2. update_sub_field() when existing data is different.
    3. Loop through fields and get_sub_field() and display new data.

    I *could* keep a copy of the changed data and use that when displaying the new data but it would be easier to get fresh data from the database.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.