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.

Метод класса: MyAccountEndpoint{}

Хуков нет.

Возвращает

string. The nonce action name.

Использование

$result = MyAccountEndpoint::get_nonce_action( $action, $notification_id ): string;
$action(строка) (обязательный)
One of the ACTION_* values.
$notification_id(int) (обязательный)
The notification id.

Код MyAccountEndpoint::get_nonce_action() WC 11.2.2

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