/** * Reverts headers to previous state after use of apply_once() & disable_once() */ static function _reset() { if (!empty(self::$tmp)) { self::$args = self::$tmp; self::$tmp = array(); } elseif (self::$tmp === false) { self::$args = array(); self::$tmp = array(); self::remove(); } else { self::add(); } remove_action('phpmailer_init', array(__CLASS__, '_reset')); }