WordPress at Your Fingertips
function is not described

WC_Webhook_Data_Store::get_webhooks_ids() public WC 3.3.0

Get webhooks IDs from the database.

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

No Hooks.

Return

Int[].

Usage

$WC_Webhook_Data_Store = new WC_Webhook_Data_Store();
$WC_Webhook_Data_Store->get_webhooks_ids( $status );
$status(string)
Optional - status to filter results by. Must be a key in return value of @see wc_get_webhook_statuses(). @since 3.6.0.
Default: ''

Changelog

Since 3.3.0 Introduced.

Code of WC_Webhook_Data_Store::get_webhooks_ids() WC 5.8.0

public function get_webhooks_ids( $status = '' ) {
	if ( ! empty( $status ) ) {
		$this->validate_status( $status );
	}

	$ids = get_transient( $this->get_transient_key( $status ) );

	if ( false === $ids ) {
		$ids = $this->search_webhooks(
			array(
				'limit'  => -1,
				'status' => $status,
			)
		);
		$ids = array_map( 'absint', $ids );
		set_transient( $this->get_transient_key( $status ), $ids );
	}

	return $ids;
}