Skip to content

Commit 61fed3b

Browse files
authored
return max categories in a single request
Currently limited to 10 categories
1 parent dedbd2c commit 61fed3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-rest-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class WpRestClient extends AbstractWordPressClient {
106106

107107
async getCategories(certificate: WordPressAuthParams): Promise<Term[]> {
108108
const data = await this.client.httpGet(
109-
getUrl(this.context.endpoints?.getCategories, 'wp-json/wp/v2/categories'),
109+
getUrl(this.context.endpoints?.getCategories, 'wp-json/wp/v2/categories?per_page=100'),
110110
{
111111
headers: this.context.getHeaders(certificate)
112112
});

0 commit comments

Comments
 (0)