publish_post action doesn’t work
It’s never fired since the hook you need is not publish_post but publish_magazine which is actually {$new_status}_{$post_type} hook. So try publish_magazine update: also you don’t need to use get_post since you the hook passes the $post object to the function as a second parameter. take a look at wp_transition_post_status() and if that’s not working then … Read more