• Resolved jaleal50

    (@jaleal50)


    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 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

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