Plugin Dev: Making direct API calls from a JS script?
-
My admin plugin is using React for its UI. It needs to make calls to AWS Cognito for user authentication and make calls to my company’s APIs for data.
According to the plugin AJAX docs, all WordPress AJAX requests must go through wp-admin/admin-ajax.php. Does that also apply to requests made in JS scripts?
An article I was reading had interpreted it this way, and they created a WP REST endpoint just to proxy the requests. However, someone else told me that this isn’t necessary.
Can anyone clarify this guideline? Thank you.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Plugin Dev: Making direct API calls from a JS script?’ is closed to new replies.