Skip to content

Where should I add an action if someone create a task? #484

Open
@AhmadVakil

Description

@AhmadVakil

I am trying to use hooks if a task is created.
For example, I want to debug and want to have all task details printed to the browser console if a task is created.
How can I do that using add_action? and how should I write it?

Currently I use the following code which is not working.

add_action( 'cpm_task_new', 'code_for_created_task' );
function code_for_created_task($data){
    /*A task is created*/
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions