I see you’ve marked this thread resolved now, may I ask what the issue was?
I’ve just tested the above and it worked fine for me, I placed the code in a custom functions plugin rather than functions.php.
Just a quick side note on another option for this, you can use basename() to return the template filename from the path given, then you are just comparing template names rather than pull paths all the time. I have an example of doing this here:
The support post ‘Add to cart template not being read’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.