Method |
Description |
|
__construct ( string | integer $id ) |
Setup webhook & load post data. |
|
__get ( string $key ) : mixed |
Magic get, wraps get_post_meta() for all keys except $status. |
|
__isset ( string $key ) : boolean |
Magic isset as a wrapper around metadata_exists(). |
|
deliver ( mixed $arg ) |
Deliver the webhook payload using wp_safe_remote_request(). |
|
deliver_ping ( ) : boolean | WP_Error |
Send a test ping to the delivery URL, sent when the webhook is first created. |
|
enqueue ( ) |
Enqueue the hooks associated with the webhook. |
|
generate_signature ( string $payload ) : string |
Generate a base64-encoded HMAC-SHA256 signature of the payload body so the. |
|
get_api_version ( ) : string |
API version. |
|
get_delivery_log ( integer $delivery_id ) : boolean | array |
Get the delivery log specified by the ID. The delivery log includes: |
|
get_delivery_logs ( ) : array |
Get the delivery logs for this webhook. |
|
get_delivery_url ( ) : string |
Get the delivery URL. |
|
get_event ( ) : string |
Get the event for the webhook, e.g. created. |
|
get_failure_count ( ) : integer |
Get the failure count. |
|
get_hooks ( ) : array |
Get the hook names for the webhook. |
|
get_i18n_status ( ) : string |
Get the webhook i18n status. |
|
get_name ( ) : string |
Get the friendly name for the webhook. |
|
get_new_delivery_id ( ) : integer |
Create a new comment for log the delivery request/response and. |
|
get_post_data ( ) : null | WP_Post |
Get the post data for the webhook. |
|
get_resource ( ) : string |
Get the resource for the webhook, e.g. order. |
|
get_secret ( ) : string |
Get the secret used for generating the HMAC-SHA256 signature. |
|
get_status ( ) : string |
Get the webhook status: |
|
get_topic ( ) : string |
Get the webhook topic, e.g. order.created. |
|
get_user_id ( ) : integer | string |
Get the user ID for this webhook. |
|
log_delivery ( integer $delivery_id, array $request, array | WP_Error $response, float $duration ) |
Log the delivery request/response. |
|
process ( mixed $arg ) |
Process the webhook for delivery by verifying that it should be delivered. |
|
set_api_version ( string $version ) |
Set API version. |
|
set_delivery_url ( string $url ) |
Set the delivery URL. |
|
set_secret ( string $secret ) |
Set the secret used for generating the HMAC-SHA256 signature. |
|
set_topic ( string $topic ) |
Set the webhook topic and associated hooks. The topic resource & event. |
|
update_status ( $status ) |
Update the webhook status, see get_status() for valid statuses. |
|