Your settings object in ajax call is not properly set up: action should be inserted in the data object.
For example:
$.ajax({
url: ajax_url,
data:{
action: 'trailer_report',// action must be set here
// other stuff here
}
//other ajax stuff
});
Hope it helps!
Related Posts:
- jQuery’s .on() method combined with the submit event
- Nonces and Cache
- How to HTML5 FormData Ajax
- admin-ajax.php doesn’t work when using POST data and Axios
- Contact Form 7 Custom Post Action
- Custom Form with Ajax
- ajax – why multiple calls to wp_create_nonce() return same value?
- How to link WordPress heartbeat to ajax form
- Ajax form submission from admin panel
- Confused on AJAX submit form through page template
- how to use reCaptcha v3 in wordpress custom login form?
- Prevent page reload after ajax form submission
- submitting form via admin-ajax.php returns 0
- Admin Ajax and HTML5 Formdata
- jQuery Ajax passing empty parameters to my function?
- Using ajax with wordpress
- Using AJAX with Forms
- Ajax image upload with media_handle_upload and form.js
- Ajax post returning full html page as response
- Sending variable from ajax on form submit
- contact form ajax empty response error message
- Can’t trigger an AJAX function with a submit button in the dashboard
- Dynamically add more fields/remove last field in a form
- Ajaxify Form That Submits To Same Page To Display Post Data [closed]
- Using admin-ajax prevents regular php form submission
- Specify ABSPATH in jQuery url
- ajax form is returning the dreaded “[HTTP/1.1 400 Bad Request” and a zero
- Output multi-steps form results in same page
- Using get_theme_mod in php ajax form doesn’t work
- How to create a form button that executes a function?
- How to stop being directed to admin.php after sending request to admin-ajax.php
- How to display contact form 7 form in vanilla js without jquery in frontend
- Should wordpress nonce be placed in html form or in javascript file
- Add Server Side validation in Ajax mail form
- How to send automatic response after form submission without plugin
- Opening Modal popup on Ajax form submission
- Registration form AJAX check for existing username (simple version)
- Issue developing an AJAX form with WordPress
- Ajax show custom post data form & script
- Using AJAX on Contact-form the WordPress way
- Error while submitting form using AJAX and php
- Ajax contact form returnig 0
- Ajax Form data is not posted back to the get_results()
- Using AJAX for dynamic settings pages
- Bad Request when adding new post via ajax form
- WordPress REST API FormData: Form Not Submitted When No Files Attached
- jQuery: Performing synchronous AJAX requests
- FormData append not working
- Best way to end WordPress ajax request and why?
- How to pass data parameter to ajax action function handler
- Update user meta using with ajax
- WordPress function that makes HTML safe to be sent via AJAX request
- admin-ajax.php returns 0. How do I debug it and fix it?
- Detecting post type within init action
- Basic question on passing variables to AJAX in WordPress
- Metabox cloning via Admin Ajax call issue
- Serving nonces through AJAX is not refreshing nonce, returning 403 error
- Cannot update my options using wp_ajax
- ajax and nonce when JavaScript is in a seperate file
- Prevent wp_debug from polluting ajax within plugin
- How to localize inline script called with ajax
- Conditional Ajax inclusion
- Allow AJAX call to other roles than admin
- Help add ajax load more button
- Can a wp_nonce created from domain 1 to be verified on domain 2?
- How to use several wp_ajax_ functions for different queries?
- Three level taxonomy dropdown frontend
- How to solve “Updating failed” with 403 Error when trying to save a Site or Post in Gutenberg?
- How to set post_id to 0 when you upload image via Add media button. (async-upload.php)
- Using a custom plugin to capture input data via Ajax and PHP
- Updating User Meta with Array on Click of Button AJAX
- Why is on status span no search results?
- eventON plugin AJAX call triggers website crash
- WordPress ajax call returns a zero though die()
- Ajax form submit not working, returns 0
- WP_query offset seems to be counting draft post – AJAX load more
- Can’t load search results with ajax
- wp_ajax is not calling the action
- Deny dashboard access breaks ajax requests
- Run javascript upon successfully set featured image
- update_option in WordPress AJAX
- Plugin Form Submitting to admin-ajax.php instead of admin-post.php
- ajax in admin menu
- Ajax Favorite from foreach (how to specify which result result is processed)
- WordPress responds to the ajax request with readyState 1, 2, 3 before responding with 4
- Filter images from media library by guid meta field
- Counting Posts with multiple taxonomy and terms condition using MySQL and AJAX
- 400 Bad Request getting on AJAX Call
- How to add Ajax to this Pagination i made?
- Adding user using admin ajax by a user with custom role
- How can I run two AJAX requests simultaneously in WordPress?
- Ajax the create and edit post form into lightbox and get results
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- Can Ajax Action [add_action(‘wp_ajax_{action_name}’, ‘{action_name}’] be hooked into wp hook
- Strange AJAX problem (SOMETIMES works in Chrome/FF, ALWAYS works in Midori)
- Loads posts of different year via AJAX call
- AJAX admin Internal 500 error Failed to Upload
- Class property not visible inside ajax callback function?
- how reduce fetch/XHR response time
- How to stop a nonce from being cached in an inline script, or alternatives to regenerate it if expired?