Need to fix Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist

If you are using Elementor Pro Page Builder and other related plugins that compliments Elementor you may be dealing with this fatal error.

Below is the full context of this fatal error. 

   

Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist’

The good news is that we can give you the exact thing that you need to do to get this fixed quickly and your website functioning again.

– Connect to your website files using FTP or your hosting control panel

– Navigate to the file path /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php

Code snippet form file : /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php:45

fatal-error-uncaught-reflectionexception-method-get-site-editor-type-does-not
$reflection = new \ReflectionClass( $class_name ); //45 line
$method = $reflection->getMethod( 'get_site_editor_type' );

// It's own method, use it.
if ( $class_name === $method->class ) {
    return static::get_site_editor_type();
}

Replace following code to quick fix.

fixed-fatal-error-uncaught-reflectionexception-method-get-site-editor-type-does-not
if (method_exists($class_name, "get_site_editor_type")) {
    $reflection = new \ReflectionClass( $class_name );
    $method = $reflection->getMethod( 'get_site_editor_type' );
    
    // It's own method, use it.
    if ( $class_name === $method->class ) {
        return static::get_site_editor_type();
    }
}