I noticed that all code is executed immediately and is not registered with the acf/init hook. After changing that it is now possible to use acf related code. This might even fix https://github.com/Log1x/acf-composer/issues/94
I did some test and with these adjustments i was able to create field groups, blocks, options and widgets through the cli.
The thing I am not sure about is the registerPlugin function. It also registers the path but i didn´t get my head around what this functions does or when it is called. Maybe it needs to be wrapped around the action hook too.
I encountered that i cannot use acfs´s
get_field()
within my field declarations. https://github.com/Log1x/acf-composer/issues/162I noticed that all code is executed immediately and is not registered with the acf/init hook. After changing that it is now possible to use acf related code. This might even fix https://github.com/Log1x/acf-composer/issues/94
I did some test and with these adjustments i was able to create field groups, blocks, options and widgets through the cli.
The thing I am not sure about is the registerPlugin function. It also registers the path but i didn´t get my head around what this functions does or when it is called. Maybe it needs to be wrapped around the action hook too.