If you use switch_to_blog
, that use always also restore_current_blog
. The restore_current_blog
function undos the last call to switch_to_blog
, but only by one step, the calls are not nestable, so always call restore_current_blog
before calling switch_to_blog again.