WC_Admin_Webhooks_Table_List::get_legacy_api_webhooks_countpublicWC 9.0.0

Get how many of the existing webhooks are configured to use the legacy payload format.

Method of the class: WC_Admin_Webhooks_Table_List{}

No Hooks.

Returns

Int. Count of existing webhooks are configured to use the legacy payload format.

Usage

$WC_Admin_Webhooks_Table_List = new WC_Admin_Webhooks_Table_List();
$WC_Admin_Webhooks_Table_List->get_legacy_api_webhooks_count();

Changelog

Since 9.0.0 Introduced.

WC_Admin_Webhooks_Table_List::get_legacy_api_webhooks_count() code WC 10.3.5

public function get_legacy_api_webhooks_count() {
	return count( array_filter( $this->items, array( $this, 'uses_legacy_rest_api' ) ) );
}