How to resolve conflict between weForms and LearnPress

WordPress theme plugin conflict

In some cases, weForms users face the blank screen on the weForms settings if they have the LearnPress installed. The same may happen for the LeanPress settings or both of them.

I hope you already know how to find conflicts between the plugins and themes.

Actually, it’s because of a tiny conflict on a function between weForms and LearnPress. However, I have found a simple snippet to solve this problem.

See also  How to fix the conflict between WP Project Manager and Awesome Support plugin

Here is the snippet that can help you to ride out of it.

add_filter( 'learn-press/admin-default-scripts', 'rt_replace_js' );
function rt_replace_js( $data ){
    $screen = get_current_screen();
    if ( $screen->base != 'toplevel_page_weforms' ) {
        return $data;
    }
    return array();
}

Insert this snippet in your theme function.php file and save it.

Note: It’s good to have a backup before adding codes to a file. Please make sure you have taken a complete backup of your site or the file you are editing.

One Comments

Leave a Reply