WordPress at a glance
function is not described

WP_Paused_Extensions_Storage::delete() public WP 5.2.0

Forgets a previously recorded extension error.

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

No Hooks.

Return

true|false. True on success, false on failure.

Usage

$WP_Paused_Extensions_Storage = new WP_Paused_Extensions_Storage();
$WP_Paused_Extensions_Storage->delete( $extension );
$extension(string) (required)
Plugin or theme directory name.

Changelog

Since 5.2.0 Introduced.

Code of WP_Paused_Extensions_Storage::delete() WP 5.7

<?php
public function delete( $extension ) {
	if ( ! $this->is_api_loaded() ) {
		return false;
	}

	$option_name = $this->get_option_name();

	if ( ! $option_name ) {
		return false;
	}

	$paused_extensions = (array) get_option( $option_name, array() );

	// Do not delete if no error is stored.
	if ( ! isset( $paused_extensions[ $this->type ][ $extension ] ) ) {
		return true;
	}

	unset( $paused_extensions[ $this->type ][ $extension ] );

	if ( empty( $paused_extensions[ $this->type ] ) ) {
		unset( $paused_extensions[ $this->type ] );
	}

	// Clean up the entire option if we're removing the only error.
	if ( ! $paused_extensions ) {
		return delete_option( $option_name );
	}

	return update_option( $option_name, $paused_extensions );
}