27 $request_parameters = [
33 $response = wp_remote_post(
38 if ( is_wp_error( $response ) ) {
39 throw new Exception( $response->get_error_message() );
42 $body = wp_remote_retrieve_body( $response );
44 if ( is_wp_error( $body ) ) {
45 throw new Exception( $response->get_error_message() );
49 $response = json_decode( $body,
true );
51 throw new Exception( esc_html__(
'Unable to process remote request. Invalid response body.',
'gk-gravityview' ) );
static query_api( $url, array $args=[])
Performs remote call to GravityKit's EDD API.