In these cases the methods are called statically. The class might look like this, note the static
keyword:
class Foo
{
public static function bar()
{
echo "Hello, world!";
}
}
And then you can register the callback like this:
add_action( 'hookname', ['Foo', 'bar'] );
There is no object instance, so no __construct()
will be called. This is basically just a way to “name space” procedural functions.