Does your server know its own name and/or have loopback connections allowed?
Like, if you do a remote get on just the main blog page, does that work?
If the server doesn’t know its own name because the DNS doesn’t resolve, or loopback connections are disabled at the server level (these are common “security” measures on some cheap hosting), then connecting back to yourself won’t work.
Edit: Okay, so if that is not it, then did you try hooking to the wp_ajax_nopriv_
hook? Since you’re not passing cookies along or any form of credentials with wp_remote_get, then you will be connecting as an unprivileged user, which means it’ll use the nopriv hook instead of the normal priv’d hook.
Related Posts:
- Do I require the use of nonce?
- simple wordpress ajax plugin not working when not logged in
- Problem with WordPress Ajax form
- Use wp_remote_get to get JSON instagram feed from public profile
- How to set a custom path, for ajax image upload folder in admin?
- admin-ajax.php responding with 0
- Page Reloads Before AJAX Request Finishes
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- How to test nonce with AJAX – Plugin development
- Create onClick Event to Re-load a Widget
- WordPress ajax doesn’t display object method on jQuery .change() function
- adjust section according to country?
- How to send Ajax request from my plugin in admin dashboard?
- AJAX success response is not working but it’s saving my changes
- how to update and display an option without reloading the page
- Using data sent via AJAX in multiple functions on a WP plugin
- Problem with AJAX in wordpress plugin
- Any ideas why I am getting “I’m getting “wp-admin/admin-ajax.php 401 (Unauthorized)”
- SOAP Request/Parsing XML From wp_send_json_success
- Accessing an API with jQuery and AJAX
- Execute Jquery when a specific page in my plugin is loading
- PHP: How to access db the right way in plugin?
- Submit form to db
- How to use wp_send_json() and output the value with ajax?
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- Is it possible to access admin-ajax.php using PHP?
- Settings API form – submit with AJAX
- Post form – AJAX won’t upload featured image – Plugin development
- How can I get my WordPress plugin to receive data and relay it in an ajax/php request to a remote server that requires authentication?
- Submit remote form to wordpress REST API and save data to custom post type
- custom mailchimp form using HTTP API
- 400 bad request admin-ajax file upload
- Contactform7: display results from CURL
- Input field duplicates on form submit by jQuery
- Ajax in a class instantiated via shortcode
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- AJAX & PHP | Call a specific PHP function from a PHP file via AJAX?
- Cookie not created in AJAX request
- How to pass and validate nonce in custom REST routes
- getJSON response to PHP
- ajax problems on loading page [closed]
- Can I use the same nonce for multiple requests on the same page?
- Real time Duplicate title check
- How to use a frontend URL with a Plugin
- Making a follow button, Ajax not talking to php
- WordPress template_include filter not working properly
- “The plugin generated 2694 characters of unexpected output…” on Plugin activation, CREATE TABLE sql command not working
- How to display a value from a radio button in the options menu in wordpress
- Ajax form submit within a Post Metabox
- WordPress File handle – fopen, fwrite not working with $.ajax or $.post Jquery
- Stumped – Ajax Response Returns 0
- doing an ajax request always outputs 0
- Trying to implement Ajax comments in WordPress, getting WP error
- Ajax – Call to undefined function get_option()
- How to use $_GET function WordPress backend
- populate form fields in a loop with ajax
- Extend PHP regex to cover “srcset” and “style” attributes
- How to pass Select value from Javascript to PHP to generate select option on change
- Plugins not working on AJAX requests
- How can I hide that I Use WordPress (with W3 Total Cache)
- Custom array from a query only write the last row of the query
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- load ajax using admin-ajax.php
- Ajax button not working
- How to remove the message ‘We could not find any results for your search’ without changing template files and without adding posts/pages?
- Custom meta box values are not getting saved for my custom post type
- Simple AJAX notification when the new post is added to the database
- When echo follow Ajax button inside Ajax pagination template not working?
- jQuery Ajax PHP function call returning [object Object]
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Retrieve Json data and create multiple pages with it
- Loading Posts & Category with Ajax
- Can I remove or edit an include() from a function with a filter?
- Call to undefined function error in plugin
- AJAX function not working [closed]
- Validating an email input from form field before submit using JQuery, AJAX, and PHP
- WordPress can’t use ZipArchive
- Only the first image uploads
- WordPress loading progess – wp-blog-header.php
- Custom plugin: how do I call a PHP file if settings option is set to true?
- Trying to use a variable to set image width
- wp_update_post gives 500 internal error
- How to identify which php file a plugin is using on page load?
- dashboard widget form not submit mails
- register_setting not save checkbox
- How does one make a URL return dynamic JSON with custom Content Type?
- wp_set_object_terms returns 500 error when called through AJAX function
- Remove item from post_meta array via AJAX
- add menu page in loop menu order
- wp_send_json erase last value
- How to load WP_Editor JS files manually (with AJAX)?
- Custom post type single page return to listing page
- Use jQuery and AJAX to get HTML
- How to get site homepage from plugin?
- WordPress rewrite question
- Using Nonce for my Form
- Create new folder and upload files to custom folder via wp_handle_upload
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- How can I use AJAX in child theme template?
- WordPress REST API – Custom field not added to pages