July 27, 2024
[FIXED] – Fatal Error : Uncaught ReflectionException: Method get_site_editor_type does not exist
Table Of Contents
show

About the Issue

Due to the Elementor updated version, you may face the issue, Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist, you can fix this issue by commenting some code in the Elementor plugin file.

Solution

Go to the folder – /wp-content/plugins/elementor-pro/modules/theme-builder/documents and open theme-document.php

If you don’t have access to FTP or cPanel then you may install a File Manager Plugin.

On line no 45, you will find the below 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();
}

Just replace it with the below code.

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

Awesome!!
The issue of Fatal error: Uncaught ReflectionException: Method get_site_editor_type does not exist will be fixed.

Also read this

[Fixed] – Elementor Not Loading Error – 7 Solutions

2 thoughts on “[FIXED] – Fatal Error : Uncaught ReflectionException: Method get_site_editor_type does not exist

Leave a Reply

Your email address will not be published. Required fields are marked *