Hube2 / acf-post2post

Automatic Two Way (Bidirectional) Relationships with ACF5 Pro
156 stars 20 forks source link

Reciprocal relationships not set when creating post through API or webhook. #41

Open ageandsee opened 3 years ago

ageandsee commented 3 years ago

Hi there! Firstly, thank you so much for this plugin. Helps a ton! The plugin works perfectly when using the WP Admin GUI.

However, when creating a post through the API, and setting the values of the relationships to the relevant post-ids, the relationships only show up in the created post, and not the related posts. Same result when using forms (Gravity), Zapier or Integromat to create posts.

Is there a way to trigger the function to run after new post creation through the API?

Hube2 commented 3 years ago

What "API"

This plugin does the updating using an acf/update_value filter. This is called when ACF updates a value in the admin and would also be called if using the function update_field() in acf.