woocommerce_new_stock_notification │ action-hook │ WC 11.3.0

Action: woocommerce_new_stock_notification

Fires after a stock notification is created, from any code path. With double opt-in the new notification is pending until the shopper verifies it, so integrations that only want confirmed sign-ups can wait for woocommerce_stock_notification_status_changed active instead.

Usage

add_action( 'woocommerce_new_stock_notification', 'wp_kama_woocommerce_new_stock_notification_action', 10, 2 );

/**
 * Function for `woocommerce_new_stock_notification` action-hook.
 * 
 * @param int          $notification_id The notification ID.
 * @param Notification $notification    The notification.
 *
 * @return void
 */
function wp_kama_woocommerce_new_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::create()
woocommerce_new_stock_notification
woocommerce/src/Internal/DataStores/StockNotifications/StockNotificationsDataStore.php 214
do_action( 'woocommerce_new_stock_notification', $notification_id, $notification );

Where the hook is used in WooCommerce

Usage not found.