Some actions must be registered as early as possible. When you put it in the "current_page_function"
method, (depending on your program) it might be too late.
Hence, the wp_ajax_*
hook cannot find your action, and it returns the error.
Related Posts:
- WordPress Ajax callback function from plugin – OOP
- Bad request 400 using class based files
- ajaxurl not defined on front end
- Why does WordPress add 0 (zero) to an Ajax response?
- Plugin Form Submission Best Practice
- PHP error with shortcode handler from a class
- Saving data-URI to media library
- How to create a flexible abstraction for WP_Query?
- What is the correct way to build a widget using OOP
- Nonces can be reused multiple times? Bug / Security issue?
- How-to implement admin Ajax inside an admin WP_List_Table?
- How to make method from plugin available in theme?
- Single Responsibility Principle and WP Classes
- Using AJAX in FrontEnd with WordPress Plugin Boilerplate (wppb.io)
- The ideal place for storing persistent PHP objects
- wp_localize_script $handle
- How to enable users to down-vote in this simple voting counter (that uses the post meta)?
- Adding callback function for wp_ajax_ has no effect
- Plugin Settings not Saving on Ajax re-ordered table
- Timeout on Admin-Ajax?
- Admin-ajax.php appending a status code to ajax response
- set_sale_price in WooCommerce [closed]
- Comment `Reply` link doesn’t work if comments are loaded from ajax
- How do you render_callback for register_block_type to a method in another class?
- Ensure function has completed before allowing another Ajax call
- Fetching the value of forms in WordPress AJAX
- How to Create database table when Plugin installed/activated, and delete database when Plugin deleted
- Advice on plugin structure
- include wp-blog-header not working on MAMP
- Any problem in using native jquery ajax style instead of using admin-ajax.php?
- Show special field when correct shipping is chosen
- .mo translation strings not loading in PHP scripts that handle AJAX calls
- How can I pass get_the_author_meta(‘user_email’) through the REST API?
- Including the necessary functions for a custom ajax registration form
- How to localize admin.php only once
- get post attachment using ajax
- Create a new post using rest api and save featured image using an external image url
- how to search users by ajax live search
- Plugin Architecture Question: How to avoid using transients
- What is the proper method of using global $post?
- wp.template() returns tags in Ajax response
- How to get Metabox custom field to show checked if value is updated using post meta query?
- Fatal error: Uncaught Error: Call to undefined function get_option()
- Use just a shortcode from another page
- template_redirect or admin-ajax.php?
- Dynamically creating classes for Widget API
- how to get context information inside my funcion
- WordPress class, using add_action to call member function does not work
- AJAX form post returns 0
- Update Data parameter of a wp_localize_script() call
- Bad Request in AJAX
- Remove an action by extending class and replacing it
- ajax recursive calls on wordpress returning answers outsite the function scope
- Ajax submit result opens in admin-ajax.php
- Are there any security risks when submitting data-attribute data through AJAX?
- WordPress plugin development OOP style
- insert query on a custom table using ajax with jQuery plugin Jeditable
- Plugin AJAX Save to Custom Table
- Data not insert and update through ajax and jQuery in admin page?
- Setting a JSON web token from a secondary api as a secure cookie on WordPress
- WP ajax requests not stacking?
- How do I get rid of my inclusion race-condition on wp_enqueue_script
- AJAX button with success callback. (Titan Framework)
- AJAX call returns ‘testtest0’ instead of ‘test’ – why?
- OOP plugin not working
- Best practice for plugin: always detect admin-ajax call?
- Why is the form not updating when I select a new sector from the list?
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- AJAX request not routing through proxy
- Get cat parameter from admin-ajax
- GET request return value as error instead of success
- How to control ajax calls without effecting memory of server?
- Forbidden Error in ajax call with wordpress
- “add to cart” links css class “ajax_add_to_cart” doesn’t show in woocommerce in widget sidebar
- ajax stopped working when not logged in wordpress
- ajax call return 406 not acceptable for non logged users only
- Does $this context change in an AJAX callback?
- ajax response strips multidimensional array and unable to decode
- WordPress Ajax not returning Response
- functions won’t fire after I converted my code from procedural code to OOP
- Using AJAX to submit and return data inside the WordPress Plugin Boiler Plate framework
- Inserted data from database does not showing on front-page without referesh page?
- wp_ajax function return the html page
- $_SESSION inside php function executed by AJAX
- Two same AJAX calls – one is working, other doesn’t
- How to set a public variable in someone else’s plugin class
- How to get values from Tinymce visual editor popup?
- How To do Ajax In WordPress Custom Plugin?
- Ajax call not working with
- WP Ajax on page load not working on bluehost but was working on Godaddy
- Ajax not working to insert, query and result data
- Object Oriented plugin, add action and variables
- Can’t get query string in ajax call
- Ajax url value to pass ‘variable’ to use in query
- An adiitional function fires on my AJAX submit
- Fatal error: Call to a member function query() on a non-object in my ajaxpage
- How To Remove The Filter That Adds JetPack Related Content To Dom [closed]
- Trigger a JavaScript function based on the data fetched from Woo commerce hook
- Why my admin-ajax url returns 0 even after adding echo and die() at the end of function?
- WordPress plugin boilerplate AJAX functionality