woocommerce_privacy_before_remove_stock_notification_personal_data │ action-hook │ WC 11.3.0

Action: woocommerce_privacy_before_remove_stock_notification_personal_data

Fires before a stock notification is anonymized by the privacy eraser, while it still holds the original email and user ID. The save that follows fires woocommerce_update_stock_notification the anonymized row, plus woocommerce_stock_notification_status_changed when an active or pending notification is cancelled. Neither can identify the shopper any more.

Usage

add_action( 'woocommerce_privacy_before_remove_stock_notification_personal_data', 'wp_kama_woocommerce_privacy_before_remove_stock_notification_personal_data_action', 10, 3 );

/**
 * Function for `woocommerce_privacy_before_remove_stock_notification_personal_data` action-hook.
 * 
 * @param int          $notification_id The notification ID.
 * @param string       $original_email  The email stored on the notification before anonymization.
 * @param Notification $notification    The notification, not yet anonymized.
 *
 * @return void
 */
function wp_kama_woocommerce_privacy_before_remove_stock_notification_personal_data_action( $notification_id, $original_email, $notification ){
	// action...
}
$notification_id(int)
The notification ID.
$original_email(string)
The email stored on the notification before anonymization.
$notification(Notification)
The notification, not yet anonymized.

Changelog

Since 11.3.0 Introduced.

Where the hook is called

PrivacyEraser::erase_notification_data()
woocommerce_privacy_before_remove_stock_notification_personal_data
woocommerce/src/Internal/StockNotifications/Privacy/PrivacyEraser.php 106
do_action( 'woocommerce_privacy_before_remove_stock_notification_personal_data', $notification->get_id(), $notification->get_user_email(), $notification );

Where the hook is used in WooCommerce

Usage not found.