PHP Класс WC_API_Webhooks

Наследование: extends WC_API_Resource
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$base string the route base

Открытые методы

Метод Описание
create_webhook ( array $data ) : array Create an webhook
delete_webhook ( integer $id ) : array Delete a webhook
edit_webhook ( integer $id, array $data ) : array Edit a webhook
get_webhook ( integer $id, array $fields = null ) : array Get the webhook for the given ID
get_webhook_deliveries ( string $webhook_id, string | null $fields = null ) : array Get deliveries for a webhook
get_webhook_delivery ( string $webhook_id, string $id, string | null $fields = null ) : array Get the delivery log for the given webhook ID and delivery ID
get_webhooks ( array $fields = null, array $filter = [], $status = null, integer $page = 1 ) : array Get all webhooks
get_webhooks_count ( string $status = null, array $filter = [] ) : array Get the total number of webhooks
register_routes ( array $routes ) : array Register the routes for this class

Приватные методы

Метод Описание
query_webhooks ( array $args ) : WP_Query Helper method to get webhook post objects

Описание методов

create_webhook() публичный Метод

Create an webhook
С версии: 2.2
public create_webhook ( array $data ) : array
$data array parsed webhook data
Результат array

delete_webhook() публичный Метод

Delete a webhook
С версии: 2.2
public delete_webhook ( integer $id ) : array
$id integer webhook ID
Результат array

edit_webhook() публичный Метод

Edit a webhook
С версии: 2.2
public edit_webhook ( integer $id, array $data ) : array
$id integer webhook ID
$data array parsed webhook data
Результат array

get_webhook() публичный Метод

Get the webhook for the given ID
С версии: 2.2
public get_webhook ( integer $id, array $fields = null ) : array
$id integer webhook ID
$fields array
Результат array

get_webhook_deliveries() публичный Метод

Get deliveries for a webhook
С версии: 2.2
public get_webhook_deliveries ( string $webhook_id, string | null $fields = null ) : array
$webhook_id string webhook ID
$fields string | null fields to include in response
Результат array

get_webhook_delivery() публичный Метод

Get the delivery log for the given webhook ID and delivery ID
С версии: 2.2
public get_webhook_delivery ( string $webhook_id, string $id, string | null $fields = null ) : array
$webhook_id string webhook ID
$id string delivery log ID
$fields string | null fields to limit response to
Результат array

get_webhooks() публичный Метод

Get all webhooks
С версии: 2.2
public get_webhooks ( array $fields = null, array $filter = [], $status = null, integer $page = 1 ) : array
$fields array
$filter array
$page integer
Результат array

get_webhooks_count() публичный Метод

Get the total number of webhooks
С версии: 2.2
public get_webhooks_count ( string $status = null, array $filter = [] ) : array
$status string
$filter array
Результат array

register_routes() публичный Метод

Register the routes for this class
С версии: 2.2
public register_routes ( array $routes ) : array
$routes array
Результат array

Описание свойств

$base защищенное свойство

the route base
protected string $base
Результат string