Quantcast
Channel: Topic Tag: action | WordPress.org
Viewing all articles
Browse latest Browse all 897

add_actions doesn’t work

$
0
0

Hello, I am having trouble using the actions described in the documentation 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 all articles
Browse latest Browse all 897

Trending Articles