Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [wp-remote-request]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

wp_http remote request not respecting timeout

I am trying to test for timeout scenarios for my API requests using WP_Http::request() by passing a very short timeout argument (a minimal fraction of a second). After my API requests continued to ...
Talk Nerdy To Me's user avatar
0 votes
1 answer
248 views

WordPress getting data from external API

I am trying to create a Plugin that does the following jobs: Authenticate the user to get Bearer token 'access_token' Get data from API and store in Database I have checked all the APIs and ...
I. Antonov's user avatar
1 vote
1 answer
295 views

Why is this specific API request failing when sending via wp_remote_post?

I'm pulling my hair out trying to make a POST request to an API endpoint using wp_remote_post. The API needs a request with content-type multipart/mixed but WordPress doesn't seem to play nicely with ...
WackGet's user avatar
  • 111
2 votes
1 answer
2k views

Wordpress wp_remote_post vs wp_remote_request

I'm somehow new to Wordpress and its API and while writing an simple Rest Service to an remote Server i have been asked to use the native wp_remote_X functions. Right now i have some trouble to ...
Christian Felix's user avatar
1 vote
1 answer
1k views

WP_REMOTE_POST Requests are being blocked by API provider [closed]

I'm trying to make some API POST requests via WordPress' own method i.e. wp_remote_post() Here is the sample code I'm using: $args = array ( 'sslverify' => false, 'headers' => [ '...
Duryab's user avatar
  • 11
2 votes
0 answers
54 views

What would be the best way to implement Magic Link logins in WordPress?

On the internet I saw several plugins/services offering a kind of a 'magic login' link functionality. This allows users to sign in without a password but with a magic link. That made me wondering: If ...
ralphjsmit's user avatar
0 votes
1 answer
2k views

wp_remote_post sends empty body

I made an api with nodejs and i'm trying to make some calls to it throught wordpress, all the requests works correctly but when i add a request body it is sent empty, i tried to search what was the ...
Mat.C's user avatar
  • 111
0 votes
0 answers
102 views

Can I call a functions.php file from a different URL?

I have several(5+) sites that are very similar in functionality. With that I have the same amount of functions.php files and child themes. What I'd like to do is have one common functions file and ...
lz430's user avatar
  • 113
0 votes
1 answer
500 views

Using webhook sending message to telegram from wordpress?

I want send a message to telegram whenever a form submitted. i am using gravity form plugin form. and it has the hook add_action( 'gform_after_submission', 'post_to_third_party', 10, 2 ); which will ...
Nadia's user avatar
  • 35
1 vote
3 answers
2k views

is_admin() returns false in save_post hook with Gutenberg editor

I have a plugin that implements a REST API that needs to be notified when an admin adds one of my supported shortcodes to a page or post. I hook save_post with my function like this. ...
AldenG's user avatar
  • 11
4 votes
2 answers
3k views

Custom routes for custom post type?

I have a custom post type called 'event'. An event has multiple subpages like registration, speakers, contact us, etc. Currently the content is saved as one or more custom fields. I would like to ...
gloom's user avatar
  • 185
1 vote
0 answers
2k views

how to avoid timeouts with remote API requests?

I'm developing a plugin, WP SoundSystem, that makes Wordpress rest requests to my remote API api.spiff-radio.org. That API is scraping content on the web. Which means that it might be slow to get the ...
gordie's user avatar
  • 492
0 votes
1 answer
315 views

wp_remote_request to url with port 8001 not woorking

I try to send a request with the function wp_remote_request and it is not accepted (Note the port at URL) When I download the port it is accepted Where's the problem? tish is the code: $args = ...
sbc's user avatar
  • 1
1 vote
0 answers
1k views

wp_remote_request header error even though working properly with cURL

I'm trying to make calls to a JSON API inside my wordpress theme. I tried with the cURL option, making a custom function and things works as it should but I wanted to use the built-in wordpress ...
nineam's user avatar
  • 51
0 votes
1 answer
645 views

Install plugin on remote wordpress

I want to install a plugin using wp-cli (or anything else) on a WordPress based website. I have URL, admin-user, admin-pass only. (no FTP/ssh). I want to do it programmatically, without going into the ...
Abdul Waheed's user avatar
0 votes
0 answers
1k views

view counter update in WordPress REST api HTTP get

I use WordPress rest API for app communication with my site in need update post view counter when HTTP get API. I search a lot but nothing found about it, in a tutorial "Find popular posts with the ...
ebeliejinfren's user avatar
0 votes
2 answers
982 views

How to debug new shortcode? And how to get string from shortcode into code?

I am trying to write a simple plugin that fetches some data from an API endpoint. I am planning to read the api key from a shortcode, but didn't get that far yet. I wrote the following piece of code. ...
Stereo View's user avatar
2 votes
0 answers
279 views

Proxy not working with Requests::request_multiple()?

I try to send async multiple requests with proxy option by built-in WP Class Requests, but it's not working. $options = array( 'proxy' => $proxy ); Single Request, it's working, so the proxy ...
Cl0udSt0ne's user avatar
-2 votes
1 answer
2k views

How can I interact with a third party service that sends POST requests to me in response to the order information that I send them?

I'm developing a payment gateway for Wordpress. I should send the data to a third party and get the confirmation code (and other info) from them. The problem is that they don't return this ...
Nozulani's user avatar
0 votes
1 answer
505 views

wp_remote instead of file_get_contents on non json

I have searched this website and although there are a lot of threads regarding the wp_remote functions but none are what I am asking and would like to know if its possible. I am wanting to scrape a ...
Robert's user avatar
  • 199
3 votes
2 answers
802 views

Is curl required?

My admin panel is very slow I've tried to debug the issue. I nailed it to the function wp_remote_post and an internal error message thrown by curl on this line return new WP_Error( '...
Gregor's user avatar
  • 141
1 vote
0 answers
232 views

wp cron job fires at every second or so, if callback is wrapped with DOING_CRON check it never fires at all

I am a bit lost while dealing with a open source plugin implementing wp cron. You can read about the problem on github https://github.com/nekojira/wp-currencies/issues/6#issuecomment-116735909 - I ...
unfulvio's user avatar
  • 1,814
27 votes
3 answers
24k views

Is it safe to use sslverify => true for with wp_remote_get/wp_remote_post

I normally use this argument to prevent errors with wp_remote_get and wp_remote_post array( 'sslverify' => false ) For security reasons I would like to set it to true (or remove it since the ...
Xaver's user avatar
  • 1,039
0 votes
2 answers
1k views

How can I call specific function if requested URL is not found?

My website is fully API based and builds pages/posts from API data. I was thinking to create something like PHP magic function __call to call specific function when requested URL would return 404, but ...
deb0rian's user avatar
  • 105
0 votes
0 answers
126 views

Submit form stored in one plugin from another plugin?

I have two plugins pluginA and pluginB. PluginA contains a form with a single button which when pressed will do some calculations. PluginA works fine, however, I want to be able to submit this form ...
Ghazanfar Mir's user avatar
0 votes
1 answer
647 views

http_response_timeout filter not working

I am writing a Wordpress plugin that makes calls to external sites. I want to raise the timeout for all wp_remote_* calls, so I added the following to the __construct function of my plugin: ...
Manuel Meurer's user avatar
1 vote
1 answer
2k views

How to run a function on plugin's options page?

I am writing a plugin that syncs data from a third party service to custom post types in wordpress via HTTP/SOAP. There will be the option to run it on an interval (using wP_cron functions) but I also ...
biggles's user avatar
  • 127
8 votes
1 answer
12k views

How to use the HTTP API with a Proxy?

If I want to route a HTTP request through a local (alias: on the current server) Proxy, how would I go around this? The allowed Proxy settings for the wp-config.php are the following: # HTTP Proxies ...
kaiser's user avatar
  • 50.6k
4 votes
2 answers
831 views

WP_Http_Cookie destroys cookie value through urldecode()

Background: Working on a Widget that uses a remote API using wp_remote_post to log into the service, once logged in storing the cookies received for the second request to query data with wp_remote_get....
Silvan Hagen's user avatar
3 votes
2 answers
2k views

Facebook OAuth, WP_Http::request() vs wp_remote_request()

Running WordPress 3.3.2 and PHP Version 5.2.17 I'm trying to get the access_token from Facebook using wp_remote_request() and Facebook OAuth API (btw, working example at the end of this entry). Is ...
soderlind's user avatar
  • 191
1 vote
1 answer
282 views

how to remotely check a username / password from within a plugin

people need a user account on my site to be able to download a plugin. I want to add an activation function in the plugin so a user must supply their username and password the first time they use the ...
CommentLuv's user avatar
0 votes
1 answer
3k views

Wp Remote get with manual redirect

I set add_filter( 'http_request_redirection_count', array($instance,'SetDirectionCount')); to 0 I try to get 'http://boards.ign.com/The_Vestibule/b5296/' or 'http://www.informationweek.com/story/'...
edelwater's user avatar
  • 2,574
1 vote
1 answer
805 views

Using wp-cron in backpress - problems with wp_remote_post, fsockopen error

I'm working on a BackPress project where I need to schedule cron tasks. The cron_uri for BP is stored in options, rather than hardcoded as it is in WP core. I've tried setting the option to mysite.com/...
goldenapples's user avatar
  • 9,206