WordPress at a glance
function is not described

WC_API_Webhooks::get_webhooks() public WC 2.2

Get all webhooks

{} It's a method of the class: WC_API_Webhooks{}

No Hooks.

Return

Array.

Usage

$WC_API_Webhooks = new WC_API_Webhooks();
$WC_API_Webhooks->get_webhooks( $fields, $filter, $status, $page );
$fields(array)
-
$filter(array)
-
$status(string)
-
$page(int)
-

Changelog

Since 2.2 Introduced.

Code of WC_API_Webhooks::get_webhooks() WC 5.0.0

<?php
public function get_webhooks( $fields = null, $filter = array(), $status = null, $page = 1 ) {

	if ( ! empty( $status ) ) {
		$filter['status'] = $status;
	}

	$filter['page'] = $page;

	$query = $this->query_webhooks( $filter );

	$webhooks = array();

	foreach ( $query['results'] as $webhook_id ) {
		$webhooks[] = current( $this->get_webhook( $webhook_id, $fields ) );
	}

	$this->server->add_pagination_headers( $query['headers'] );

	return array( 'webhooks' => $webhooks );
}