Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

0
votes
1answer
44 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 ...
0
votes
0answers
79 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 ...
0
votes
0answers
96 views

wp_remote_request does not return a response from from server when ran as Cron

Problem: wp_remote_get/wp_remote_request of a specific https target fails to return a response unless ran via WP_CLI function. $wp_remote_args => array( 'timeout' => 5, 'sslverify' =>...
0
votes
1answer
80 views

Fetching API data using

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. ...
1
vote
0answers
62 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 ...
-3
votes
1answer
654 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 ...
0
votes
1answer
204 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 ...
0
votes
2answers
343 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( '...
1
vote
0answers
128 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 ...
16
votes
3answers
8k 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 ...
0
votes
2answers
717 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 ...
0
votes
0answers
52 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 ...
0
votes
1answer
281 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: ...
1
vote
1answer
962 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 ...
6
votes
1answer
6k 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 ...
4
votes
2answers
552 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....
3
votes
2answers
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 ...
1
vote
1answer
249 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 ...
0
votes
1answer
1k 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/'...
1
vote
1answer
688 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/...