Skip to content

Commit cace67a

Browse files
committed
Added extra check to prevent possible issues
1 parent b82aaa4 commit cace67a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pdf-forms-for-contact-form-7.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ public function admin_enqueue_scripts( $hook )
405405
wp_register_script( 'wpcf7_pdf_forms_notices_script', plugin_dir_url( __FILE__ ) . 'js/notices.js', array( 'jquery' ), self::VERSION );
406406
wp_enqueue_script( 'wpcf7_pdf_forms_notices_script' );
407407

408+
if( ! class_exists('WPCF7') || ! defined( 'WPCF7_VERSION' ) )
409+
return;
410+
408411
if( false !== strpos($hook, 'wpcf7') )
409412
{
410413
wp_register_script( 'wpcf7_pdf_forms_admin_script', plugin_dir_url( __FILE__ ) . 'js/admin.js', array( 'jquery', 'jcrop' ), self::VERSION );

0 commit comments

Comments
 (0)