woocommerce_update_stock_notification │ action-hook │ WC 11.3.0

Action: woocommerce_update_stock_notification

Fires after a stock notification is updated, from any code path, whether or not anything changed. Also fires inside the back-in-stock send batch, so defer remote calls to Action Scheduler.

Usage

add_action( 'woocommerce_update_stock_notification', 'wp_kama_woocommerce_update_stock_notification_action', 10, 2 );

/**
 * Function for `woocommerce_update_stock_notification` action-hook.
 * 
 * @param int          $notification_id The notification ID.
 * @param Notification $notification    The notification.
 *
 * @return void
 */
function wp_kama_woocommerce_update_stock_notification_action( $notification_id, $notification ){
	// action...
}
$notification_id(int)
The notification ID.
$notification(Notification)
The notification.

Changelog

Since 11.3.0 Introduced.

Where the hook is called

StockNotificationsDataStore::update()
woocommerce_update_stock_notification
woocommerce/src/Internal/DataStores/StockNotifications/StockNotificationsDataStore.php 334
do_action( 'woocommerce_update_stock_notification', $notification->get_id(), $notification );

Where the hook is used in WooCommerce

Usage not found.