I think you should organize your code to return things from Ajax call.
If this should work for any user you need to use also wp_ajax_nopriv_...
However, I would use dionoh_filter_reports action name.
add_action( 'wp_ajax_dionoh_filter_reports', 'filter_reports' );
add_action( 'wp_ajax_nopriv_dionoh_filter_reports', 'filter_reports' );
I suggest you check this and learn more.
Related Posts:
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- Retrieve POST data from AJAX call
- WordPress Ajax always returns a 404 error
- problem with ajax and the path to the php page
- How to use wp_localize_script in a WordPress page other than functions.php?
- Real time Duplicate title check
- Load custom field value into div with AJAX
- Jquery ajax to custom php file: returning blank data
- Update WordPress Custom Field with AJAX on cached page
- Looking for a better way to handle an ajax script that pulls in post data on click
- Targeting single page with JS
- Click loads template via ajax
- Display notification only once
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Access/update database with jQuery
- Passing jQuery value using Ajax to a page template
- Returning a value from a PHP page
- Why is this Ajax not working?
- Stumped – Ajax Response Returns 0
- 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
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- Parsing php string in jquery [closed]
- doing an ajax request always outputs 0
- Woocommerce add to cart quantity buttons with AJAX
- class click counter save number
- Checking for new message using AJAX and PHP. Server overload?
- AJAX request status 200 but no actual “response”
- wordpress count link clicks by ip address
- ajax, right way to do it and make it works?
- Ajax load more posts with multiple tax query
- WordPress Sending data to Ajax with select option
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Save Search System
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- Setting value of session with Ajax not working
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Plugins not working on AJAX requests
- Fancybox type popup window that’s not an iframe
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- How do I Import / Upload Files with jQuery AJAX?
- WordPress admin-ajax.php 400 bad request
- Pull GetOption() variable into jQuery dynamically created html
- How to keep track of when a vote is cast?
- WordPress plugin admin page – using WordPress function in linked php file
- A $_POST should occur when submit form but is not?
- Shortcode to pull posts
- Ajax search shows all results when user empties input?
- Why i can’t get custom fields value or post ID via Ajax?
- Output votes to div dynamically in wordpress
- Get uploaded image and attach it to the new post
- Admin-ajax php not working on new wordpress version
- Proper way to use WordPress function with AJAX PHP file
- Live search from database table
- Add a counter for mouseovers (custom field)
- Accessing an API with jQuery and AJAX
- How to set variables with AJAX request to use in another function in WordPress
- Search Ajax Call – Use Form Data in Response
- Why does PHP called with Jquery AJAX not allow additional php code to be added?
- Database entry removed on browser refresh, Ajax PHP jQuery
- How do I call a value from the datase using ajax
- Ajax result show in console if is called outside function and not showing in array
- Can’t pass var from php wp_ajax into ajax script : result undefined or null
- Where to add my PHP codes for AJAX Jquery to work?
- How to pass values from one function to the other using an array variable
- How to change PHP variables with AJAX request in WordPress
- How to use wp_ajax_set_post_thumbnail?
- Can’t make lazy load for my site, help!
- How to reload a php script, using AJAX and jQuery
- wp_ajax_ 400 Bad Request
- update_post_meta Not Processing Array Data (Not Sure What I Am Missing)
- WordPress ajax filter returning all posts when it should be filtering by category
- Input field duplicates on form submit by jQuery
- How to echo a PHP code into WooCommerce variation product?
- How to call a function from functions.php with ajax?
- Custom theme admin-ajax.php 400 (Bad Request)
- number of posts with “Load More”
- Find the method which AJAX GET calls
- WordPress AJAX load post metadata in modal
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- ajax form with multiple submit buttons and values
- Result from wp_send_json adds line feed
- How to run ajax in WordPress Post?
- Adding instant search to wordpress page
- Add php function into .js file (for tinyMCE button)
- ajax form function error
- Load Meta box value into div AJAX [duplicate]
- JSON Object Value Show Undefine
- notify users when changed database
- getJSON response to PHP
- ajax problems on loading page [closed]
- Help with AJAX request
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- custom AJAX filtering logic and outputting results into an Elementor Loop Grid widget