Automattic\WooCommerce\Internal\StockNotifications\Frontend

MyAccountEndpoint::get_nonce_action │ public static │ WC 1.0

Build the nonce action name for an action on a given notification.

Scoped per action and per notification (wc_bis_cancel_<id>), so a nonce minted for one row's Cancel link cannot be replayed on another row or on its Resend link.

Method of the class: MyAccountEndpoint{}

No Hooks.

Returns

string. The nonce action name.

Usage

$result = MyAccountEndpoint::get_nonce_action( $action, $notification_id ): string;
$action(string) (required)
One of the ACTION_* values.
$notification_id(int) (required)
The notification id.

MyAccountEndpoint::get_nonce_action() code WC 11.2.1

public static function get_nonce_action( string $action, int $notification_id ): string {
	return 'wc_bis_' . $action . '_' . $notification_id;
}