Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AhmadVakil opened this issue Jul 27, 2023 · 1 comment
Open

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

AhmadVakil opened this issue Jul 27, 2023 · 1 comment

Comments

@AhmadVakil
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant