WordPress at a glance
function is not described

WP_Recovery_Mode::store_error() protected WP 5.2.0

Stores the given error so that the extension causing it is paused.

{} It's a method of the class: WP_Recovery_Mode{}

No Hooks.


true|false. True if the error was stored successfully, false otherwise.


// protected - for code of main (parent) or child class
$result = $this->store_error( $error );
$error(array) (required)
Error that was triggered.


Since 5.2.0 Introduced.

Code of WP_Recovery_Mode::store_error() WP 5.7.2

protected function store_error( $error ) {
	$extension = $this->get_extension_for_error( $error );

	if ( ! $extension ) {
		return false;

	switch ( $extension['type'] ) {
		case 'plugin':
			return wp_paused_plugins()->set( $extension['slug'], $error );
		case 'theme':
			return wp_paused_themes()->set( $extension['slug'], $error );
			return false;