This is using the plugin bootstrap, something I’ve never used. I find that it just over-complicates things (over abstraction, my opinion only) for simple plugins, especially for someone that’s new to WP or dev in general.
But yes, ACF hooks will work in a plugin if they are added when they need to be added.
What you need to know is, when during the course of the loading of WP is the line of code that adds your filter run. When I talk about “When” this may not have anything to do with when a file is loaded (unless that line does not depend on anything else, see below.) WordPress’s action/filter hook system means that you need to know when during the operation in terms of the hooks order does something actually happen.
The only way that that your add_filter() will be run automatically when the file is loaded is if it’s just on a line in the file outside of any functions or classes. If it is in a function or in a method of a class then it more than likely depends on when the hook fires to run the function or when the class is instantiated or when the hook that runs the method in the class is fired.
Sorry for the long winded answer that didn’t really answer anything.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
Sorry for the issues with ACF's API SSL certificate this morning. We've resolved it and your activations and downloads should be back to normal again. Thanks! ^LG— Advanced Custom Fields (@wp_acf) November 2, 2022
© 2022 Advanced Custom Fields.