WC_Admin_API_Keys::notices │ public static │ WC 1.0

Notices.

Method of the class: WC_Admin_API_Keys{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = WC_Admin_API_Keys::notices();

WC_Admin_API_Keys::notices() code WC 11.2.1

public static function notices() {
	if ( isset( $_GET['revoked'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only routing; mutation helpers verify nonces and capabilities.
		$revoked = absint( $_GET['revoked'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Read-only routing; mutation helpers verify nonces and capabilities.

		/* translators: %d: count */
		WC_Admin_Settings::add_message( sprintf( _n( '%d API key permanently revoked.', '%d API keys permanently revoked.', $revoked, 'woocommerce' ), $revoked ) );
	}
}