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.