deliver() public method

Deliver the webhook payload using wp_safe_remote_request().
Since: 2.2
public deliver ( mixed $arg )
$arg mixed First hook argument.
示例#1
-1
/**
 * Wrapper function to execute the `woocommerce_deliver_webhook_async` cron
 * hook, see WC_Webhook::process()
 *
 * @since 2.2
 * @param int $webhook_id webhook ID to deliver
 * @param mixed $arg hook argument
 */
function wc_deliver_webhook_async($webhook_id, $arg)
{
    $webhook = new WC_Webhook($webhook_id);
    $webhook->deliver($arg);
}