How To Fix WPCodeBox Conflict With Divi Engine

YouTube video

I installed WPCodeBox plugin on a website there also had divi engine plugins installed. I found out there is a conflict with WPCodeBox if Divi BodyCommerce or Divi Machine is installed. This will cause WPCodeBox to write extra letters when you type code, in the code editor it will also break the suggestion system. The issue is because divi engine is loading ace js on the WPCodeBox plugin page.
Don’t worry there is an easy fix we just need to unload divi engines ace js or the WPCodeBox plugin page.

  1. Open your WordPress dashboard.
  2. Click on WPCodeBox in the left side menu.
  3. Click new snippet and choose type php and give it a name. Also Where to run the snippet select admin area.
  4. Inset code snippet.
add_action( 'admin_enqueue_scripts', 'linnet_remove_script_from_backend', 999 );
function linnet_remove_script_from_backend() {
    if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], 'admin.php?page=wpcb_menu_page_php' ) !== false ) {
        wp_dequeue_script( 'tf-ace' );
        wp_deregister_script( 'tf-ace' );
		wp_dequeue_script( 'tf-ace-mode-css' );
        wp_deregister_script( 'tf-ace-mode-css' );
		wp_dequeue_script( 'tf-ace-theme-chrome' );
        wp_deregister_script( 'tf-ace-theme-chrome' );
		wp_dequeue_script( 'tf-ace-mode-javascript' );
        wp_deregister_script( 'tf-ace-mode-javascript' );
		
    }
}

5. Click Save.
6. Enable the snippet and save again and then the issue should be fixed.

Note: If you want you can also place the code in your child theme functions file or another place there allows you to place php in the backend.