You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many functions have a lot of return points due to having many error checks -- does the database exist, the table exist, is the token string empty, does the user exist, is the token already registered to a different user, etc. etc. -- so figure out good places to log. A function calling that function could do it, but there might be additional error checks in the calling function as well.
There's also the issue that log_action() is expecting either a wp_error or a string, so that could make it hard to add additional details to a wp_error for example whether associating a token with a user had happened via a WordPress dashboard submenu page or the API.
The text was updated successfully, but these errors were encountered:
Many functions have a lot of return points due to having many error checks -- does the database exist, the table exist, is the token string empty, does the user exist, is the token already registered to a different user, etc. etc. -- so figure out good places to log. A function calling that function could do it, but there might be additional error checks in the calling function as well.
There's also the issue that log_action() is expecting either a wp_error or a string, so that could make it hard to add additional details to a wp_error for example whether associating a token with a user had happened via a WordPress dashboard submenu page or the API.
The text was updated successfully, but these errors were encountered: