woocommerce_webhook_status хук-фильтрWC 2.2.0

Get the webhook status.

  • 'active' - delivers payload.
  • 'paused' - does not deliver payload, paused by admin.
  • 'disabled' - does not delivery payload, paused automatically due to consecutive failures.

Использование

add_filter( 'woocommerce_webhook_status', 'wp_kama_woocommerce_webhook_status_filter', 10, 2 );

/**
 * Function for `woocommerce_webhook_status` filter-hook.
 * 
 * @param string $context What the value is for. Valid values are 'view' and 'edit'.
 * @param        $id      
 *
 * @return string
 */
function wp_kama_woocommerce_webhook_status_filter( $context, $id ){

	// filter...
	return $context;
}
$context(строка)
What the value is for. Valid values are 'view' and 'edit'.
$id
-

Список изменений

С версии 2.2.0 Введена.

Где вызывается хук

WC_Webhook::get_status()
woocommerce_webhook_status
woocommerce/includes/class-wc-webhook.php 700
return apply_filters( 'woocommerce_webhook_status', $this->get_prop( 'status', $context ), $this->get_id() );

Где используется хук в WooCommerce

Использование не найдено.