WooCommerce Code Reference

WC_Admin_API_Keys
in package

WC_Admin_API_Keys.

Table of Contents

__construct()  : mixed
Initialize the API Keys admin actions.
actions()  : mixed
API Keys admin actions.
allow_save_settings()  : bool
Check if should allow save settings.
notices()  : mixed
Notices.
page_output()  : mixed
Page output.
screen_option()  : mixed
Add screen option.
bulk_actions()  : mixed
Bulk actions.
bulk_revoke_key()  : mixed
Bulk revoke key.
get_key_data()  : array<string|int, mixed>
Get key data.
is_api_keys_settings_page()  : bool
Check if is API Keys settings page.
remove_key()  : bool
Remove key.
revoke_key()  : mixed
Revoke key.
table_list_output()  : mixed
Table list output.

Methods

allow_save_settings()

Check if should allow save settings.

public allow_save_settings(bool $allow) : bool

This prevents "Your settings have been saved." notices on the table list.

Parameters
$allow : bool

If allow save settings.

Return values
bool

bulk_revoke_key()

Bulk revoke key.

private bulk_revoke_key(array<string|int, mixed> $keys) : mixed
Parameters
$keys : array<string|int, mixed>

API Keys.

Return values
mixed

get_key_data()

Get key data.

private static get_key_data(int $key_id) : array<string|int, mixed>
Parameters
$key_id : int

API Key ID.

Return values
array<string|int, mixed>