Getting error Parse error: syntax error, unexpected ‘add_filter’ (T_STRING), expecting function (T_FUNCTION)
My guess would be you have just dropped filter into a class body in between the methods. That is invalid PHP and not going to work. First you need to call it from where code makes sense, inside another class method or from outside a class. Second you cannot hook methods by their name alone, … Read more