diff --git a/functions/gravity-forms-popup-confirmation/function.php b/functions/gravity-forms-popup-confirmation/function.php index 0a3aa36..597d0d1 100644 --- a/functions/gravity-forms-popup-confirmation/function.php +++ b/functions/gravity-forms-popup-confirmation/function.php @@ -20,6 +20,14 @@ global $this_function; + // If no classes are set for the form, do nothing. + + if( ! $form['cssClass'] ) { + + return; + + } + if( strpos( $form['cssClass'], 'gf_confirmation_popup' ) !== false ) { wp_enqueue_style( $this_function['style'] ); @@ -36,6 +44,14 @@ add_filter('gform_form_args', function( $args ) { + // If no classes are set for the form, do nothing. + + if( ! $form['cssClass'] ) { + + return $args; + + } + $form_id = $args['form_id']; $form = GFAPI::get_form( $form_id );