How can I send api calls from my plugin?

You can check this: $api_endpoint=”https://url_to_API”; $api_args = array( ‘method’ => ‘GET’, ‘headers’ => array( ‘Accept’ => ‘application/json’, ‘any’ => ‘other’ ) ); $queries = array( ‘your_query’ => 1, ‘another_query’ => 5, ); $api_endpoint = add_query_arg( $queries, $api_endpoint ); $response = wp_remote_request( $api_endpoint, $api_args ); $response_code = wp_remote_retrieve_response_code( $response ) $data = json_decode( wp_remote_retrieve_body( $response ), … Read more

kali php problem [closed]

The use of curly braces ({}) in accessing an array index or string offset was deprecated in PHP 7.4 and later versions. You need to use square brackets ([]) instead. Update the code on line 82 (or there about) in call.php to fix the offending use of {}.