WC_Admin_Webhooks_Table_List
extends WP_List_Table
in package
Webhooks table list class.
Table of Contents
- __construct() : mixed
- Initialize the webhook table list.
- column_cb() : string
- Column cb.
- column_delivery_url() : string
- Return delivery URL column.
- column_status() : string
- Return status column.
- column_title() : string
- Return title column.
- column_topic() : string
- Return topic column.
- get_columns() : array<string|int, mixed>
- Get list columns.
- get_legacy_api_webhooks_count() : int
- Get how many of the existing webhooks are configured to use the legacy payload format.
- no_items() : mixed
- No items found text.
- prepare_items() : mixed
- Prepare table list items.
- process_bulk_action() : mixed
- Process bulk actions.
- search_box() : mixed
- Search box.
- display_tablenav() : mixed
- Generate the table navigation above or below the table.
- get_bulk_actions() : array<string|int, mixed>
- Get bulk actions.
- get_views() : array<string|int, mixed>
- Table list views.
- get_status_label() : array<string|int, mixed>
- Get the status label for webhooks.
- uses_legacy_rest_api() : bool
- Check if a given webhook is configured to use the legacy payload format.
Methods
__construct()
Initialize the webhook table list.
public
__construct() : mixed
Return values
mixed —column_cb()
Column cb.
public
column_cb(WC_Webhook $webhook) : string
Parameters
- $webhook : WC_Webhook
-
Webhook instance.
Return values
string —column_delivery_url()
Return delivery URL column.
public
column_delivery_url(WC_Webhook $webhook) : string
Parameters
- $webhook : WC_Webhook
-
Webhook instance.
Return values
string —column_status()
Return status column.
public
column_status(WC_Webhook $webhook) : string
Parameters
- $webhook : WC_Webhook
-
Webhook instance.
Return values
string —column_title()
Return title column.
public
column_title(WC_Webhook $webhook) : string
Parameters
- $webhook : WC_Webhook
-
Webhook instance.
Return values
string —column_topic()
Return topic column.
public
column_topic(WC_Webhook $webhook) : string
Parameters
- $webhook : WC_Webhook
-
Webhook instance.
Return values
string —get_columns()
Get list columns.
public
get_columns() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_legacy_api_webhooks_count()
Get how many of the existing webhooks are configured to use the legacy payload format.
public
get_legacy_api_webhooks_count() : int
Tags
Return values
int — Count of existing webhooks are configured to use the legacy payload format.no_items()
No items found text.
public
no_items() : mixed
Return values
mixed —prepare_items()
Prepare table list items.
public
prepare_items() : mixed
Return values
mixed —process_bulk_action()
Process bulk actions.
public
process_bulk_action() : mixed
Return values
mixed —search_box()
Search box.
public
search_box(string $text, string $input_id) : mixed
Parameters
- $text : string
-
Button text.
- $input_id : string
-
Input ID.
Return values
mixed —display_tablenav()
Generate the table navigation above or below the table.
protected
display_tablenav(string $which) : mixed
Included to remove extra nonce input.
Parameters
- $which : string
-
The location of the extra table nav markup: 'top' or 'bottom'.
Return values
mixed —get_bulk_actions()
Get bulk actions.
protected
get_bulk_actions() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_views()
Table list views.
protected
get_views() : array<string|int, mixed>
Return values
array<string|int, mixed> —get_status_label()
Get the status label for webhooks.
private
get_status_label(string $status_name, int $amount) : array<string|int, mixed>
Parameters
- $status_name : string
-
Status name.
- $amount : int
-
Amount of webhooks.
Return values
array<string|int, mixed> —uses_legacy_rest_api()
Check if a given webhook is configured to use the legacy payload format.
private
uses_legacy_rest_api(WC_Webhook $webhook) : bool
Parameters
- $webhook : WC_Webhook
-
Webhook object.