WC_Webhook::process( mixed $arg )

Process the webhook for delivery by verifying that it should be delivered.


Description Description

and scheduling the delivery (in the background by default, or immediately).


Parameters Parameters

$arg

(Required) The first argument provided from the associated hooks.


Top ↑

Return Return

(mixed) $arg Returns the argument in case the webhook was hooked into a filter.


Top ↑

Source Source

File: includes/class-wc-webhook.php

	public function process( $arg ) {

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

		// 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;
	}

Top ↑

Changelog Changelog

Changelog
Version Description
2.2.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.