Tribe__PUE__Notices::clear_notices( string $plugin_name, bool $defer_saving_change = false )

Removes any notifications for the specified plugin.

Useful when a valid license key is detected for a plugin, where previously it might have been included under a warning notification.

If the optional second param is set to true then this change will not immediately be committed to storage (useful if we know this will happen in any case later on in the same request).


Parameters

$plugin_name

(string) (Required)

$defer_saving_change

(bool) (Optional) = false

Default value: false


Top ↑

Source

File: src/Tribe/PUE/Notices.php

	public function clear_notices( $plugin_name, $defer_saving_change = false ) {
		foreach ( $this->notices as $notice_type => &$list_of_plugins ) {
			unset( $list_of_plugins[ $plugin_name ] );
		}

		if ( ! $defer_saving_change ) {
			$this->save_notices();
		}
	}