fix: ensure autoloader is available for TCPDF check
Added a condition to require the composer autoload file if the autoloader is available before checking for the TCPDF class. This change ensures that the TCPDF library is properly loaded, preventing potential errors caused by missing dependencies.
This commit is contained in:
parent
d901010399
commit
32cbcedc52
1 changed files with 3 additions and 0 deletions
|
@ -725,6 +725,9 @@ add_filter('login_headertext', 'custom_login_logo_url_title');
|
|||
// Check if TCPDF is available
|
||||
function is_tcpdf_available()
|
||||
{
|
||||
if (is_autoloader_available()) {
|
||||
require_once get_template_directory() . '/vendor/autoload.php';
|
||||
}
|
||||
return class_exists('TCPDF');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue