CodePudding user response:
You're missing the quotes in your add_action
functions for the callback. That's why it thinks it is an undefined constant.
add_action('post_submitbox_misc_actions', 'createCheckBoxField');
Ref: https://developer.wordpress.org/reference/functions/add_action/