Title: add_actions doesn&#8217;t work
Last modified: July 22, 2020

---

# add_actions doesn’t work

 *  Resolved [jaleal50](https://wordpress.org/support/users/jaleal50/)
 * (@jaleal50)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/add_actions-doesnt-work/)
 * Hello, I am having trouble using the actions described in the documentation [https://wedevs.com/docs/wp-project-manager/developer-docs/actions](https://wedevs.com/docs/wp-project-manager/developer-docs/actions).
 * I am trying to create an email notification when a task is completed using the“
   cpm_task_complete” action.
 * the code would be more or less the following:
 * add_action (‘cpm_task_complete’, ‘send_email_notification’);
 * function send_email_notification ($task_id) {
    wp_mail (‘myemail@example.com’,‘
   New Task Completed’, ‘A new task has been completed’); }
 * The code would be more complete, but in general The problem is that I cannot 
   get the function to run, I have tried all the actions described in the documentation
   and I cannot get any to work, while all the filters work perfectly.

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

 *  [Md. Yeasin](https://wordpress.org/support/users/mdmamun-1/)
 * (@mdmamun-1)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/add_actions-doesnt-work/#post-13168231)
 * Hi [@jaleal50](https://wordpress.org/support/users/jaleal50/),
 * Thanks for writing here.
 * The code has been changed and we are going to change the developer documentation.
   
   Also, we do not have any action hook after changing the task status so, your 
   current code will not work.
 * You can check the code structure here [https://github.com/weDevsOfficial/wp-project-manager/blob/develop/core/Notifications/Emails/Complete_Task_Notification.php](https://github.com/weDevsOfficial/wp-project-manager/blob/develop/core/Notifications/Emails/Complete_Task_Notification.php)
 * To get support faster just contact us directly through our [website](https://wedevs.com/contact)
   that we can check your site and fix this issue as soon as possible.
 * Best regards.
 *  Thread Starter [jaleal50](https://wordpress.org/support/users/jaleal50/)
 * (@jaleal50)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/add_actions-doesnt-work/#post-13169025)
 * Hello, Thanks for answering after trying and reviewing the code a couple of days
   ago I realized what you are saying, so I simply changed the plugin for a better
   developed one. So I marked the issue as resolved. Thank you

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

The topic ‘add_actions doesn’t work’ is closed to new replies.

 * ![](https://ps.w.org/wedevs-project-manager/assets/icon-256x256.gif?rev=3386164)
 * [Project Manager – AI Powered Project Management, Task Management, Kanban Board & Time Tracker](https://wordpress.org/plugins/wedevs-project-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wedevs-project-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wedevs-project-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wedevs-project-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wedevs-project-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wedevs-project-manager/reviews/)

## Tags

 * [action](https://wordpress.org/support/topic-tag/action/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 2 replies
 * 2 participants
 * Last reply from: [jaleal50](https://wordpress.org/support/users/jaleal50/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/add_actions-doesnt-work/#post-13169025)
 * Status: resolved