I am using ACF to manage additional fields attached to a few different WP Post Types (native, WooCommerce and Custom Post Types). Some of these Posts are created programmatically using
I have noticed that Posts created through the WordPress Backend have all of the expected ACF fields present, but when a Post is created programmatically, it has no ACF fields – they need to be set manually using
This is not expected behaviour.
I am suggesting that ACF should hook the appropriate action so that the creation of ACF fields is uniform between manual and programmatic Post creation. (Possibly with a switch which allows the “Required” rules to be overridden, where used.)
As it stands, rather than looking at the ACF fields attached to a Post which has been programmatically generated, I instead have to ask ACF what fields should be there, and then loop through them and generate them myself.