WC_Webhook::process()publicWC 2.2.0

Process the webhook for delivery by verifying that it should be delivered. and scheduling the delivery (in the background by default, or immediately).

Метод класса: WC_Webhook{}

Хуки из метода


Разное. $arg Returns the argument in case the webhook was hooked into a filter.


$WC_Webhook = new WC_Webhook();
$WC_Webhook->process( $arg );
$arg(разное) (обязательный)
The first argument provided from the associated hooks.

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

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

Код WC_Webhook::process() WC 8.3.1

public function process( $arg ) {

	// Verify that webhook should be processed for delivery.
	if ( ! $this->should_deliver( $arg ) ) {

	// Mark this $arg as processed to ensure it doesn't get processed again within the current request.
	$this->processed[] = $arg;

	 * Process webhook delivery.
	 * @since 3.3.0
	 * @hooked wc_webhook_process_delivery - 10
	do_action( 'woocommerce_webhook_process_delivery', $this, $arg );

	return $arg;