Title: Undefined constant &#8220;TEMPLATEPATH&#8221;
Last modified: May 26, 2023

---

# Undefined constant “TEMPLATEPATH”

 *  Resolved [Hung Nguyen](https://wordpress.org/support/users/phihung91nd/)
 * (@phihung91nd)
 * [3 years ago](https://wordpress.org/support/topic/undefined-constant-templatepath/)
 * The plugin doesn’t work in the latest wordpress version and PHP 8.1
 * **Error: Undefined constant “TEMPLATEPATH” in wp-includes\theme.php on line **
   _158_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [smakazmi15](https://wordpress.org/support/users/smakazmi15/)
 * (@smakazmi15)
 * [3 years ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16770985)
 * Hi [@phihung91nd](https://wordpress.org/support/users/phihung91nd/),
 * I hope you are doing well.
 * Does this error disappear if you deactivate Post SMTP?
 * Thanks and regards,
   Support Team – WPExperts
 *  Plugin Support [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16868209)
 * Hi [@phihung91nd](https://wordpress.org/support/users/phihung91nd/) ,
 * Hope you are doing good. We have been waiting to hear from you for the last five
   weeks and assume your issue has been resolved.
 * Feel free to reopen this issue in case the problem persists.
 * Thanks and regards,
   Support Team – WPExperts
 *  Thread Starter [Hung Nguyen](https://wordpress.org/support/users/phihung91nd/)
 * (@phihung91nd)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16868278)
 * Hi [@smakazmi15](https://wordpress.org/support/users/smakazmi15/) [@haseeb0001](https://wordpress.org/support/users/haseeb0001/),
 * This issue disappears when deactivating Post SMTP. It’s due to the function is_child_theme()
   called in the plugin. I think it’s not called at the right time. I have to use
   another smtp plugin.
 *  Plugin Support [M Haseeb](https://wordpress.org/support/users/haseeb0001/)
 * (@haseeb0001)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16874117)
 * Hi [@phihung91nd](https://wordpress.org/support/users/phihung91nd/) ,
   Thanks 
   for taking time to share your findings. Let us dig with our technical team for
   the mentioned case, and we’ll keep you updated.Thanks and regards,Support Team–
   WPExperts
 *  [smakazmi15](https://wordpress.org/support/users/smakazmi15/)
 * (@smakazmi15)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16883009)
 * Hi [@phihung91nd](https://wordpress.org/support/users/phihung91nd/),
 * I hope you are doing well.
 * It seems like the issue is with Contact from plugin; please [create a ticket on our technical support channel](https://objectsws.atlassian.net/servicedesk/customer/portal/16)
   so that we can connect you directly with our Technical team.
 * Looking forward to getting your issue resolved.
   Thanks and regards,Support Team–
   WPExperts

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Undefined constant “TEMPLATEPATH”’ is closed to new replies.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [smakazmi15](https://wordpress.org/support/users/smakazmi15/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/undefined-constant-templatepath/#post-16883009)
 * Status: resolved