what is the difference between hook_insert and hook_node_insert? How could I use hook_insert in place of hook_node_insert or vice versa

1 Answer 1


The difference is stated in the hook_insert documentation:

This hook is invoked only on the module that defines the node's content type (use hook_node_insert() to act on all node insertions).

This hook is only fired on the module that defines its own content type for nodes of that content type, so you only should use it in this case for your own content types.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.