WordPress recommendations for the register_activation_hook
hook are:
- Don’t do
echo
directly in theregister_activation_hook
callback function. Do it other hooks likeinit
oradmin_init
- Make sure you are closing the PHP tag
?>
. Otherwise, you will get theHeader already sent notifications
.
I have tested your code, I think you are closing the PHP tag ?>
at the end of the file.