setWpUserToken method
Set the logged in customer's wp_json_api token.
The token is sent in the wpUserTokenHeader header on every request so WooSignal can verify which customer is asking. Pass null or an empty string to clear it, e.g. when the customer logs out.
Implementation
void setWpUserToken(String? token) {
String? trimmed = token?.trim();
_wpUserToken = (trimmed == null || trimmed.isEmpty) ? null : trimmed;
if (_isDioReady) {
_setDioHeaders();
}
}