Wednesday, June 1, 2022
HomeWordPress Developmentrelaxation api - Proxy Exterior API request in PHP from Edit.js in...

relaxation api – Proxy Exterior API request in PHP from Edit.js in Block Plugin


I am working with a third-party API that has optionally available filters on their API. I am making a block the place the person has two choose components in Edit.js which might be displayed on the backend of the block. They will choose filters, specialty, and site, these values are then saved in attributes.

As soon as a person modifications a choose, I wish to hearth off a PHP request utilizing these attributes handed to the PHP perform that makes use of wp_remote_get() to construct the proxy and dump the information into the remaining level.

I’ve the Edit.js perform setup however am not sure learn how to name the PHP perform from the Edit.js file with the handed block attributes.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments