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]
- Trying to implement Ajax comments in WordPress, getting WP error
- WooCommerce get_price returning wrong price when used via ajax
- What does $wpdb->get_row return?
- Can’t search posts using WP_QUERY inside AJAX Function
- Woocommerce add to cart quantity buttons with AJAX
- WP add_action factory
- wp_loaded hook block script enquequing
- Why is the post meta[] empty when I make a call to the wordpress rest api?
- WP nonce invalid
- class click counter save number
- woocommerce subscriptions – get expiration date [closed]
- Same log message keeps on printing to debug.log file thousand of times
- Any possible way to make $wpdb->get_results() return anything else than array?
- wp_remote_get adding backslashes
- get post based on category chosen in drop down – The ajax method
- Why is $_REQUEST an empty array in admin-ajax.php?
- Adding Default Settings to Theme My Login plugin
- Checking for new message using AJAX and PHP. Server overload?
- Custom filter in admin edit custom post type responding with invalid post type?
- WordPress Scheduled Event Request Blocking
- Where Does WordPress Make cURL Requests? How To Add cURL Option
- How can i upload images in an admin page?
- Append HTML Using Shortcode
- AJAX request status 200 but no actual “response”
- get current custom post ID by WP_Query method
- Delete a WordPress transient from a shortcode on Page/Post update
- How to make drop down post title
- Ajax not working es expected (Returns 0)
- Plugin CSS not enqueing
- Swapping wp_dropdown_categories function with wp_category_checklist
- Accessing the database from a plugin outside of action hooks
- Adding subdomain to home_url for “add_menu_page”
- How to show phpinfo() only in a new tab?
- Load a page into a div with Ajax
- How to find error in my code when the error message is pointing to WP core file?
- How to select the contents in the text view textrea in wp_editor?
- Creating a Multi-Level Associative Object Using AJAX
- wordpress count link clicks by ip address
- How to access global variable $menu inside a class function
- Ajax – Call to undefined function get_option()
- ajax, right way to do it and make it works?
- Hide categories that are not used in the post type
- Automated Cart Update With Alert Box Each Time
- How can I remove a function that has been added to wordpress with add_filter?
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- Ajax load more posts with multiple tax query
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- Ajax call not working
- export a csv file from the database with a cronjob
- How to store data from multiple forms using ajax and php
- Using a custom plugin to capture input data via Ajax and PHP
- How to sanitize any integer input field in wordpress?
- WordPress Sending data to Ajax with select option
- PHP 8, AJAX mail form to function.php doesn’t work
- How to set up VS Code for WP plugin/theme development in 2021? [closed]
- Ajax loaded form replaces form action with Ajax url
- Ajax category filtering products default show all
- Custom user login page by creating a plugin
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site