• Resolved verygoodplugins

    (@verygoodplugins)


    Hey guys,

    It looks like the WPForms_Conditional_Logic_Core class was removed in v1.6.8, which is causing problems with our custom integration class that extends WPForms_Provider.

    Specifically the error is:

    PHP Fatal error:  Uncaught Error: Call to undefined function wpforms_conditional_logic() in /wp-content/plugins/wpforms-lite/includes/providers/class-base.php:957
    Stack trace:
    #0 /wp-content/plugins/wpforms-lite/includes/providers/class-base.php(298): WPForms_Provider->output_conditionals('connection_60fe...', Array, Array)
    #1 /wp-includes/class-wp-hook.php(303): WPForms_Provider->process_ajax('')
    #2 /wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #3 /wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #4 /wp-admin/admin-ajax.php(187): do_action('wp_ajax_wpforms...')
    #5 {main}
      thrown in /wp-content/plugins/wpforms-lite/includes/providers/class-base.php on line 957

    Was that class intentionally removed, or is this a bug?

    If WPForms Lite no longer supports conditional logic we can come up with our own implementation, but I’m hoping this is just a bug since your WPForms_Provider class still makes references to wpforms_conditional_logic().

    Looking forward to your reply. Thanks
    Jack

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey @verygoodplugins,

    Thanks for writing in!

    I reached out to our development team for further clarification on the reason for this class being removed.

    This class specifically relates to the Conditional Logic feature that’s only available in our paid license levels. In our most recent update, WPForms v1.6.8, we decreased memory footprint by removing the code that shouldn’t be loaded for Lite users, but it looks like we missed some places which is why you’re seeing the WPForms_Provider class still reference conditional logic, and plan to clean it up in the future release.

    However, Our development team has come up with an adjustment you can make to the file /wp-content/plugins/wpforms-lite/includes/providers/class-base.php:

    <pre>
    // \WPForms_Provider::output_conditionals() on line 348
    if ( empty( $connection['conditional_logic'] ) || empty( $connection['conditionals'] ) || ! function_exists( 'wpforms_conditional_logic' ) ) {
    	return true;
    }
    // \WPForms_Provider::output_conditionals() on line 953
    if ( empty( $connection['account_id'] ) || ! function_exists( 'wpforms_conditional_logic' ) ) {
    	return '';
    }
    </pre>

    I apologize for the trouble here but I hope this helps!

    Thanks!

    Thread Starter verygoodplugins

    (@verygoodplugins)

    Hey @williamdersh , thanks for checking into that! We don’t always get such thorough responses here on the forums ??

    That solution makes sense to me. We were only enabling conditional logic with WPForms Pro anyway, so it thankfully doesn’t affect our functionality.

    I’ll pass on your suggested patch and we’ll probably just recommend folks stick with Lite v1.6.7.3 until the next update hopefully closes this.

    Thanks again and have a good one!
    Jack

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Missing WPForms_Conditional_Logic_Core since 1.6.8’ is closed to new replies.