You can jump in front of an AJAX hook by specifying a higher priority (i.e. lower number), like this:
add_action( 'wp_ajax_find_posts', 'wp_ajax_find_posts', 0 );
NB: works because 0 < 1
Related Posts:
- Using Ajax with a Class file
- Are ‘wp_ajax’ and ‘wp_ajax_nopriv’ exclusive to authenticated and non-authenticated users?
- Ajax Request not coming back to class
- wp_ajax action is not running
- add_action(‘wp_ajax_[action name]’, myfunction) problem
- add_action and Ajax
- WordPress Ajax Problems
- Placement of add_action() for ajax callback?
- admin-ajax.php ” Missing argument 2″ warning
- Code run fast on a cronjob but slow with a do_action or ajax call
- WordPress ajax-action how to return content
- WordPress action – Pass arguments into action in an AJAX call?
- why does not work ajax that add_action registered in wordpress
- wp_ajax action is not run when ajax trigger
- Sharing variables in both actions wp_footer and wp_ajax
- Ajax callback not work
- admin-ajax.php calls fail if referrer is sent with 500
- How to run an ajax call in elementor editor
- do_action won’t work in ajax callback
- Ajax call works for logged in users and returns “Bad Request” for guests [duplicate]
- Its possible to ajax update the content of the admin custom post type list
- Trigger action via button
- Why function called by admin-ajax executes synchronously?
- where does my function output from load-* go?
- Static var overwritten with WP AJAX action, works fine without AJAX
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- Show spinner GIF during an $http request in AngularJS?
- gettext does not translate when called in ajax
- Execute one AJAX request after another AJAX request finished
- Ajax and autocomplete
- Load tinyMCE / wp_editor() via AJAX [duplicate]
- Saving (Updating) Post / Page Edits With AJAX
- Automatically pull newer posts and append to current page.
- Dynamically changing navigation links (next and previous) via AJAX
- edit-comments.php comment_row_actions ajax problem
- Why is my AJAX call not working?
- How to Access custom database content with AJAX onClick refresh of div inside member-only WordPress page?
- how to use reCaptcha v3 in wordpress custom login form?
- admin-ajax.php HTTP400: BAD REQUEST – The request could not be processed by the server due to invalid syntax
- AJAX action not triggering PHP function
- WP_Session not acting with AJAX
- Help with AJAX front end comment moderation
- Enqueue script in header
- Using ajax with wordpress
- wp_ajax_nopriv_xxx is not firing on one site, works on all others. -1 for logged out users
- WP_User_Query ignoring ‘meta_query’ arguments
- Increased CPU load due to admin-ajax.php spam
- Ajax not working es expected (Returns 0)
- Can’t get result from sql using ajax result
- Theme Customizer – Conditional Controls
- Edit a different page in WP Customizer
- Get the_content with ajax
- WordPress AJAX – how to return true or false in the callback function
- Admin ajax error 400 when passing select value to populate another select
- Pass additional parameter with async upload
- AJAX request randomly stop working and returns error 400
- Sending variable from ajax on form submit
- Audio TAG Not using MediaElement When Page is loaded through ajax
- Ajax calls from the theme directory
- How to pass parameters from jQuery ajax into PHP function?
- ajax is returning 0
- How to add ajax url to js using wp_add_inline_script()?
- WP AJAX post filter > do something with empty value
- How to make a fetch() POST request to wordpress rest api?
- How to jQuery Ajax show new data from successful insert?
- Redirect after saving form; and yet use wp_die()
- ajaxt returning object object [closed]
- Load more posts (Ajax) in tabbed sidebar on single.php
- Something strange with ajax
- Why is the file not uploading to the server?
- Get localize of a loaded javascript
- REST public POST giving 403 forbidden nginx
- Query data after an Ajax insert
- How to get next and previous post into ajax formed modal windows?
- Passing value from select form with Ajax not working
- Content including hooks inside wp-settings.php are being called twice in WordPress
- Problem when sending file via ajax
- wp_verify_nonce not working on the mobile device
- Frontend AJAX Media Upload returning 404
- 404 error custom post type rest api
- Change button text after ajax db update
- How to implement AJAX within a class storing shortcode atts as class variables
- How do I display posts of a specific day?
- Native WordPress Video Shortcode Not Working After Post is Loaded via Ajax
- Ajax Function call is always returning 0 in front end(without plugin) [closed]
- Ajax live search, “No products found” when the title contains apostrophes and quotations
- Add Ajax loaded posts to existing posts
- Speeding up admin-ajax.php
- admin ajax is not working for non logged in users
- Change search to outpout category name instead of Post type name
- ‘Dehighlighting’ navigation once clicked
- wp_localize_script not create variable in head section
- AJAX admin Internal 500 error Failed to Upload
- Class property not visible inside ajax callback function?
- Add “load more” functionality to an AJAX response
- weird Internal Server Error – no error log produced
- Why are the most recent posts not appearing in a fetch request, unless I’m logged in?
- Successful ajax call returns lots of whitespace and text of code with 0
- How to submit a button automatically after every scheduled hours?
- At what stage does wp_ajax hooks gets applied during WordPress request?