We’re encountering recurring issues with Advanced Custom Fields (ACF) in our backend-driven WordPress application. After a recent version upgrade, the ACF-to-REST plugin broke, which prompted me to explore ACF’s built-in endpoint exposure.
I’ve successfully set up ACF’s own endpoint, but I’m facing a problem with repeater fields. When accessing the endpoint, the fields are assigned random keys, making it difficult to work with the data as expected. Here’s a screenshot below illustrating the issue.
-
Has anyone else experienced similar issues with ACF’s built-in
endpoint and repeater fields after an upgrade?2.Are there any known solutions or workarounds for maintaining stable field keys when using ACF’s built-in endpoint?
- Alternatively, should we consider exploring other solutions? I appreciate any insights or guidance on how to resolve
this problem and ensure the sustainability of our backend-driven
application with ACF.
- Alternatively, should we consider exploring other solutions? I appreciate any insights or guidance on how to resolve
2
Answers
My mistake was having duplicate field groups. When I removed one the problem disappeared.
You should use a custom REST API endpoint that will return exactly what you want
Here is the short example you can start with: