Skip to content

Commit a6eeed8

Browse files
committed
Change nonce to _wpnonce
Fixes #74 Updating to reflect WP-API/WP-API#1524 https://core.trac.wordpress.org/ticket/34375
1 parent 216ae72 commit a6eeed8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guide/authentication/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ correctly for any custom requests.
2828

2929
For developers making manual Ajax requests, the nonce will need to be passed
3030
with each request. The API uses nonces with the action set to `wp_rest`. These
31-
can then be passed to the API via the `_wp_rest_nonce` data parameter (either POST data or in the query for GET requests), or via the `X-WP-Nonce` header.
31+
can then be passed to the API via the `_wpnonce` data parameter (either POST data or in the query for GET requests), or via the `X-WP-Nonce` header.
3232

3333
It is important to keep in mind that this authentication method relies on WordPress cookies. As a result this method is only applicable when the REST API is used inside of WordPress and the current user is logged in. In addition, the current user must have the appropriate capability to perform the action being performed.
3434

0 commit comments

Comments
 (0)