You need the function accessible to the AJAX hook when it’s fired, so move the get_states_by_ajax_callback function to your functions.php
Related Posts:
- Click loads template via ajax
- How to speed up admin-ajax.php in wordpress
- dynamic dependent select dropdown
- Why i can’t get custom fields value or post ID via Ajax?
- How to call a function from functions.php with ajax?
- Find the method which AJAX GET calls
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- WordPress Ajax always returns a 404 error
- How to use WordPress (PHP) functions in AngularJS partials files?
- Display notification only once
- Access/update database with jQuery
- How to display something in a div when the user clicks on a text in another div – no page refresh [closed]
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Sending jsPDF documents to the server
- Ajax return code 400
- How to test nonce with AJAX – Plugin development
- class click counter save number
- AJAX request status 200 but no actual “response”
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Save Search System
- Ajax load more button for comments wordpress
- How to add a do_action on refreshing of WP customizer?
- Setting value of session with Ajax not working
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Fancybox type popup window that’s not an iframe
- How to disable controls in theme customizer?
- How do I Import / Upload Files with jQuery AJAX?
- WordPress Ajax Call inserting data but success response false
- Function won’t run onclick using Ajax
- Accessing an API with jQuery and AJAX
- Execute Jquery when a specific page in my plugin is loading
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Database entry removed on browser refresh, Ajax PHP jQuery
- Ajax filter with loadmore button
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- How to use wp_ajax_set_post_thumbnail?
- AJAX to add to cart multiple products woocommerce
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- How to echo a PHP code into WooCommerce variation product?
- How can i get the same ajax result using WP REST API instead of admin-ajax?
- Custom Post type Ajax search results
- WordPress load javascript file if something… (after the page is loaded)
- number of posts with “Load More”
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- 500 (Internal Server Error) of external php file
- Dynamic Gallery
- ajax form function error
- AJAX: WordPress filters inside $html do not work as intended
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- notify users when changed database
- How can I fetch loop of post titles via AJAX?
- Handling an Ajax form submit
- Using an Image Slider twice on the same page
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- JQuery not working on WordPress Admin page [closed]
- Ajax not working es expected (Returns 0)
- Status 400 for AJAX POST Request with admin-ajax.php
- Why ajax doesn’t work on certain wordpress hooks?
- AJAX pagination, update current page
- adjust section according to country?
- Noscript not working as it should in wordpress site
- HTML escaping data with ajax requests
- load ajax using admin-ajax.php
- wordpress add_action() issue in ajax call
- Simple AJAX notification when the new post is added to the database
- Get related product based on subcategory selected from category id with ID 142
- jQuery Ajax PHP function call returning [object Object]
- How to get post category list as select in front-end?
- Is there a hack for using is_page() within the function.php file?
- How to load previous or next attachment with jquery ?
- Execute PHP code only with specific user role
- How to set value selected using select2 jquery plugin
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Disclaimer that will show every refresh of the page
- WordPress Search Ajax + Isotope + InfiniteScroll
- WordPress User Meta value variable into Google Gauge Chart
- duplicate posts with ajax load more wordpress
- How to call my PHP function with AJAX ? wp_query
- get_the_author_meta( ‘ID’ ) just return 1
- $.ajax results in 403 forbidden
- Adding extra data to shortcode attributes and pass it to JS with wp_localize_script
- wp_set_object_terms returns 500 error when called through AJAX function
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- How do I make comment-reply-button with that takes to comment reply form on click
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- How to load WP_Editor JS files manually (with AJAX)?
- AJAX Filter WHILE Loop not working WordPress
- Automatic add space if user enters number(any digit)
- Use jQuery and AJAX to get HTML
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- Jquery autosave text area after typing
- Adding jquery using php function
- Remove Woocommerce product from cart with ajax/fetch
- getJSON response to PHP
- hiddenQuestions.find is not a function
- Upload multiple files via ajax from an HTML file input