WC_Webhook_Data_Store::get_webhooks_ids( string $status = '' )
Get webhooks IDs from the database.
Description Description
Parameters Parameters
- $status
-
(Optional) - status to filter results by. Must be a key in return value of @see wc_get_webhook_statuses(). @since 3.6.0.
Default value: ''
Return Return
(int[])
Source Source
File: includes/data-stores/class-wc-webhook-data-store.php
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;
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |