Hi @stanstm
please, read again my thread. The solution is in my comment, and it’s very simple and clean.
If in your code you use a class that is not defined anywhere, of course, you may have a fatal error if you don’t check that class exists.
This seems to be a unique case only on your website since we have not yet received similar requests from our users, from this we can conclude that this is not a global issue.
This will be the case of all those users who use the plugin Ultimate VC Addons.
This is your code in lesson.php:
if(class_exists('Ultimate_VC_Addons')) {
STM_LMS_Lesson::aio_front_scripts();
}
Inside the method aio_front_scripts() you call a class Ultimate_Google_Font_Manager that you don’t define anywhere, and probably it’s not defined anymore in Ultimate VC Addons.
The solution is. very simple:
...
if( class_exists( 'Ultimate_Google_Font_Manager' ) ){
$Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager;
$Ultimate_Google_Font_Manager->enqueue_selected_ultimate_google_fonts();
}
...
instead of this:
...
$Ultimate_Google_Font_Manager = new Ultimate_Google_Font_Manager;
$Ultimate_Google_Font_Manager->enqueue_selected_ultimate_google_fonts();
...
and you solve the issue. Why you don’t want to correct your code?
As said you don’t need to get access to the website. In your plugin, you use a class that is not defined in your plugin. On the course page in my case, that class doesn’t exist, and it triggers a fatal error.
We can say your plugin has a bug already looking at the code. You don’t need to do any tests to confirm it.
WHEN YOU USE A FUNCTION OR A CLASS THAT IS NOT DEFINED IN YOUR CODE YOU MUST CHECK THAT FUNCTION OR CLASS EXISTS BEFORE USING IT.
Or you don’t agree with that?
I strongly suggest checking the class before using it if you want to avoid conflicts with other plugins.
-
This reply was modified 2 years, 3 months ago by Jose.