Use this snippet to convert legacy field groups from PHP to ACF-JSON files
I was working on a legacy project recently that had a multiple Advanced Custom Fields – field groups registered with PHP. It was difficult to edit these hard coded field groups so I decided it was best to switch these to JSON. I ran the snippet below once, it converts each of the field groups from PHP into JSON and save these JSON files to the acf-json directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters