pods_api_pre_save – cannot retrieve post ID
-
I am using the pods_api_pre_save_pod_item_(mypod) filter to make some automated updates to a couple of fields in a PODS CPT (tgz_location_bridge). However, I cannot retrieve the ID of the item being saved.
The filter triggers properly and the fields are updated. However, the field values are incorrect because they are derived from information that is related to the pod entry. Without the pod entry ID, I can’t retrieve the pod item and then retrieve the related information that I require.
I have also tried using the pods_api_post_save_pod_item(mypod) because it has a parameter for ‘$id’. However, the documentation does not clarify how that parameter can or must be used. When I used the action, I received only a zero-value for the ‘$id’ parameter, which would indicate that it is not being auto-populated by the action.
- The topic ‘pods_api_pre_save – cannot retrieve post ID’ is closed to new replies.