Aha, the problem as that I was calling the wp_ajax_plupload_action
from within my page conditional check like so:
function __construct()
{
global $pagenow;
$pages = array('post.php', 'post-new.php');
if (in_array($pagenow, $pages)) :
add_action('add_meta_boxes', array($this, 'dhf_video_meta_box'));
add_action('admin_print_scripts', array($this, 'video_meta_js'));
add_action('admin_head', array($this, 'plupload_admin_head'));
add_action('admin_print_scripts', array($this, 'video_meta_css'));
add_action('wp_ajax_plupload_action', array($this, 'plupload_action'));
endif;
}
You don’t want to do it like that. Take the
add_action('wp_ajax_plupload_action', array($this, 'plupload_action'));
outside of that check and everything works again.
Related Posts:
- How to set post_id to 0 when you upload image via Add media button. (async-upload.php)
- Get uploaded attachment width & height and attachment ID after upload them
- Access-Control-Allow-Origin error sending a jQuery Post to Google API’s
- Show spinner GIF during an $http request in AngularJS?
- Ajax in a settings page (update_option is undefined)
- gettext does not translate when called in ajax
- Execute one AJAX request after another AJAX request finished
- Ajax and autocomplete
- admin-ajax.php vs Custom Page Template for Ajax Requests
- Load tinyMCE / wp_editor() via AJAX [duplicate]
- Saving (Updating) Post / Page Edits With AJAX
- How to correctly load wordpress in a non WP script for AJAX request
- Minimal WordPress load for only `get_option` to work (because ajax…)
- 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
- add_action and Ajax
- Embedded Twitter feed won’t render nicely when loaded via Ajax
- Enqueue script dinamically
- Most performant way of fetching remote API data?
- Admin-ajax responds with 0 due to empty $_REQUEST
- Help with AJAX front end comment moderation
- Enqueue script in header
- Using ajax with wordpress
- Using foreach inside an ajax function
- 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
- Ajax Modal Flickers When Opened Multiple Times
- Increased CPU load due to admin-ajax.php spam
- Ajax image upload with media_handle_upload and form.js
- 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
- WordPress Ajax POST Error 403 admin-ajax.php
- Ajax post returning full html page as response
- Which allowed API hooks work to add wp_ajax action?
- Pass additional parameter with async upload
- AJAX request randomly stop working and returns error 400
- Sending variable from ajax on form submit
- Performance optimization of tree like structure
- WordPress search results with Ajax, get_post_type() not working
- How can I set cookies on both secure and non-secure origins at the same time?
- Audio TAG Not using MediaElement When Page is loaded through ajax
- Is it secure to use admin-ajax.php in front?
- Best way to use ajax front-end?
- 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()?
- use jQuery.load() to include a php file in a div, wp_query() is part of php file
- 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
- admin-ajax.php returns 0 even when the post status code is 200 OK
- Why is the file not uploading to the server?
- Get localize of a loaded javascript
- is there’s a way to get the next page content generated by page break block with ajax call?
- Merge PDF files from post custom fields(ACF) into one PDF file and respond back the created PDF file, WordPress(AJAX Request)
- 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
- Sending email through Ajax without page refresh hangs on admin_ajax.php
- 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
- JS global variable doesn’t update
- 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
- Jquery wrap permalink in a data-attribute?
- How do I display posts of a specific day?
- (Frontend AJAX) get post data WITH image thumbnail?
- Load .php file into div using ajax
- 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
- Using AJAX for dynamic settings pages
- 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?
- Front-end ajax problem all users and guests getting a 302 redirect when accessing wp-admin/admin-ajax.php
- Use Ajax to get an Options Settings Value
- Run PHPMailer function after ajax function completes that adds row to custom table