Forums › Forums › Search & Filter Pro › ACF relationship field doesn’t update filter options
Tagged: ACF; Relationship; Field
- This topic has 13 replies, 3 voices, and was last updated 3 years, 10 months ago by Anonymous.
-
Anonymous(Private) January 13, 2021 at 9:29 pm #272716
Hi
We are using an ACF relationship field that gets updated on the ‘acf/save_post’ hook with the values from another 2 acf relationship fields. It all works and I can see the value in the database, however, for certain relationships (even with the database showing the correct data) we can’t see them in the filter options. The relationship is displayed as a ‘checkbox’ filter, where users can tick it and filter.
I have tried rebuilding the cache, deleting the meta_key and recreating it (in the acf/save_post hook), clearing the wp_cache_delete of that post, and finally also calling do_action(‘search_filter_update_post_cache’, $post_id); for the post and all the posts in the relationship.None of which worked. The only way to make it work, is to remove the relationship, update the post (with removed relationship) and then re-add the relationship and update the post.
I need some help to understand what is the problem.
-
AuthorPosts