weDevsOfficial / wp-project-manager

The Project Management plugin for WordPress
https://wordpress.org/plugins/wedevs-project-manager/
208 stars 115 forks source link

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

Open AhmadVakil opened 1 year ago

AhmadVakil commented 1 year ago

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*/
}
AhmadVakil commented 1 year ago

I really appreciate if someone helps me with this issue. I want something(a function for instance) happen if any task is created.