Uncaught ReflectionException: Method get_site_editor_type does not exist

If you are using Elementor plugin in your wordpress website and getting Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist, then simply comment out get_site_editor_type in theme-document.php.

Solution

1. Open theme-document.php from here – /wp-content/plugins/elementor-pro/modules/theme-builder/documents/theme-document.php

2. Go to line 45 and you will find this piece of code –

$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();
}

3. Update it with this one –

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();
    }
}

That’s it. Your Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist will be resolved.