I want to override function get_post() in class EM_Tickets of plugin Event Manager
class EM_Tickets extends EM_Object implements Iterator{
/**
* Retrieve multiple ticket info via POST
* @return boolean
*/
function get_post(){
// something here
return apply_filters('em_tickets_get_post', count($this->errors) == 0, $this);
}
}
so I create my own plugin and put below codes but no luck, don't know why it's not working although I read and follow some manuals likes Is it possible to replace a function within a PHP class?
class EM_Tickets_Child extends EM_Tickets implements Iterator{
public function get_post(){
file_put_contents('log.txt', 'in child class', FILE_APPEND | LOCK_EX);
//something here
}
}