Skip to content

Commit 489dcd0

Browse files
authored
FIX: $req varibale name is wrong (#95)
The correct name of variable is not $req is $request
1 parent 8b815cf commit 489dcd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frequently-asked-questions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Instead, manually call the [`WP_REST_Server::response_to_data`](https://develope
6868

6969
```php
7070
$request = new WP_REST_Request( 'GET', '/wp/v2/posts' );
71-
$response = rest_do_request( $req );
71+
$response = rest_do_request( $request );
7272
$data = rest_get_server()->response_to_data( $response, true );
7373
var_dump( $data['_embedded'] );
7474
```

0 commit comments

Comments
 (0)