wc_update_240_webhooks()
Update webhooks for 2.4
Description Description
Return Return
(void)
Source Source
File: includes/wc-update-functions.php
function wc_update_240_webhooks() {
/**
* Webhooks.
* Make sure order.update webhooks get the woocommerce_order_edit_status hook.
*/
$order_update_webhooks = get_posts(
array(
'posts_per_page' => -1,
'post_type' => 'shop_webhook',
'meta_key' => '_topic',
'meta_value' => 'order.updated',
)
);
foreach ( $order_update_webhooks as $order_update_webhook ) {
$webhook = new WC_Webhook( $order_update_webhook->ID );
$webhook->set_topic( 'order.updated' );
}
}