Home Forums ACF PRO Using ACF Pro in plugin when standalone already installed Reply To: Using ACF Pro in plugin when standalone already installed

  • I’m assuming that you already read that you can only include ACF Pro in a premium plugin. So that aside.

    You can have ACF installed normally and part of a plugin, there won’t be a problem if they are the same version.

    You cannot run ACF Pro and ACF 4 on the same site. Only one of them will be active.

    Which version will be active is a function of WP and the order that the plugins are loaded. WP includes plugins in the order they were installed, usually, I think, sometimes it’s unclear. But when there are plugins installed normally as well as plugins installed as part of other plugins and those plugins take the care to make sure they’re not already installed before running (like ACF) then whoever is included first wins.

    You’re best bet would be to have a function that’s called on the WP hook “plugins_loaded” and test to see if ACF is already installed. This would be a way to avoid problems with ACF4 being installed. I suppose that you could then deactivate 4 at that point letting the admin know what was done. Showing or hiding the ACF admin menu would need additional testing… is ACF installed, what version was installed, did you deactivate 4, there would be a lot of variables to consider.

    Hiding the ACF field groups from someone that has access to ACF would be difficult, or maybe impossible, if the field groups are in the DB. To avoid allowing the user to edit these fields you’d need to export them and include your field groups in code.