Hi, when i add the code belowe it is called 3 times, what am i doing wrong?
public function __construct(){
echo ‘constructor’;
}
Hi, when i add the code belowe it is called 3 times, what am i doing wrong?
public function __construct(){
echo ‘constructor’;
}
Try
public function on_start() {}
or
public function on_before_render() {}
Don’t remember right now, if construct is triggered multiple time during block initialization, but those should run only once.
Great, that works! Thanks