WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wc_webhook_process_delivery() WC 3.3.0

Process webhook delivery.

Хуки из функции
Возвращает

Null. Ничего.

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

wc_webhook_process_delivery( $webhook, $arg );
$webhook(WC_Webhook) (обязательный)
Webhook instance.
$arg(массив) (обязательный)
Delivery arguments.

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

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

Код wc webhook process delivery: woocommerce/includes/wc-webhook-functions.php WC 4.3.1

<?php
function wc_webhook_process_delivery( $webhook, $arg ) {
	// Webhooks are processed in the background by default
	// so as to avoid delays or failures in delivery from affecting the
	// user who triggered it.
	if ( apply_filters( 'woocommerce_webhook_deliver_async', true, $webhook, $arg ) ) {

		$queue_args = array(
			'webhook_id' => $webhook->get_id(),
			'arg'        => $arg,
		);

		$next_scheduled_date = WC()->queue()->get_next( 'woocommerce_deliver_webhook_async', $queue_args, 'woocommerce-webhooks' );

		// Make webhooks unique - only schedule one webhook every 10 minutes to maintain backward compatibility with WP Cron behaviour seen in WC < 3.5.0.
		if ( is_null( $next_scheduled_date ) || $next_scheduled_date->getTimestamp() >= ( 600 + gmdate( 'U' ) ) ) {
			WC()->queue()->add( 'woocommerce_deliver_webhook_async', $queue_args, 'woocommerce-webhooks' );
		}
	} else {
		// Deliver immediately.
		$webhook->deliver( $arg );
	}
}