If has action not working as expected

That’s not what has_action does. has_action is true, if functions are added to fire on that hook. It is not a way to detect do_action calls.

However in that code:

  • Nothing was added to the acf_add_class action
  • If something had been added, it still wouldn’t work because the body_class filter has already ran. It would either need the ability to see into the future to observe that a filter was added to that hook in page-intro.php, or page-intro.php would need to make changes several microseconds into the past.

Fundamentally, this approach cannot work because the body class has already been generated and sent to the browser. It cannot be fixed, a brand new solution is necessary