PHP check plugin state to avoid website crash
-
Hi,
I followed this useful guide to add a custom account tab:
https://www.champ.ninja/2020/05/add-a-custom-account-tab-with-profile-form-fields/Unfortunately, when I deactivate the Ultimate Member plugin, the website crashes anytime and it will not be available anymore until I restore it.
That’s because there isn’t a check in this code, if the plugin is active or not.
Does anyone know how can I add a check?
I tried with:
if (is_plugin_active(‘ultimate-member/ultimate-member.php’)) {
//code
}The website seems not going down but the code to add the additional tab is not active.
Anyone faced the same issue?
Thanks,
Angelo
- The topic ‘PHP check plugin state to avoid website crash’ is closed to new replies.