I updated my workflow so that I am developing blocks within a plugin rather than within the theme. I’m developing the plugin locally and deploying the plugin to production. Everything is going great.
But I have just one problem.
When I modify field groups locally, those changes are reflected in the plugin’s acf-json folder. But I don’t see a Sync option when I deploy my plugin to the server with those updated field groups.
Here’s the code I’m using in my plugin to change the acf-json path.
add_filter('acf/settings/save_json', 'my_acf_json_save_point');
function my_acf_json_save_point( $path ) {
// update path
$path = plugin_dir_path( __FILE__ ) . '/acf-json';
// return
return $path;
}
ACF Version 5.8.7
You need to add a load point to also load the json from the location that you’re saving to.