So I have been struggling with a PHP error upon trying to preview and veiw the certificates senei generates and just found the fix.

make a backup

First off, I recommend exporting the certs via the admin panel.

The Sensei certificate PHP fail after migration fix

Ultimately, my fix was this: Deactivate the plugin. Delete the plugin. Mine did not give me the option to keep data.
Reinstall the plugin, activate and BOOM. It works, plus all my data was still there. Previous certificates and templates.

Hope this works for ya’ll if you are having the same error.