Correct way adding External classes to Custom Post type and output their methods to template
So I’m creating Custom Post Type, and I have 3 external classes with namespace TestEventsModel;
Those 3 classes are final class Location, final class Event, and final class Person. Example of method:
public function street(): string
return 'Street name 2';
For template, I’m using single-event.php.
My question is, How to hook all those classes and their methods? Everything I have tried it’s not working, so I’m missing something for sure.
Thank you all!