Programmatically change post visibility on save_post action return a 500
There is some information about this problem in the Action Reference for save post: If you are calling a function such as wp_update_post that includes the save_post hook, your hooked function will create an infinite loop. To avoid this, unhook your function before calling the function you need, then re-hook it afterward. So something like … Read more