You’re not printing anything from the AJAX callback. Trying using wp_send_json_success:
function ajaxtestdel(){
global $post;
$currentPdfs = get_post_meta( $post->ID, 'pdf_upload_url', true );
$postValue = isset($_POST['postid']) ? $_POST['postid'] : '';
$array_without_strawberries = array_diff($currentPdfs, array($postValue));
update_post_meta( $post->ID, 'pdf_upload_url', $array_without_strawberries );
// Send something back to AJAX
wp_send_json_success();
}
I have a feeling that perhaps your jQuery selector is incorrect for the fadeout – jQuery("#<?php echo $pdf; ?>") what is $pdf is it a valid id name?
Hope this helps!
Related Posts:
- How to Add a Third Level Sub Menu to the WordPress Admin Menu
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Is There a WordPress Hook to Filter the Edit Posts View?
- What’s the point of using WordPress’s built in admin-ajax.php?
- Making menu link open in new tab?
- Cannot access wp-admin after disabling all plugin
- Edit default comments page in WP Admin
- All Users > User List > Update User Meta Field Inline
- Create tabs in admin options page from custom post type loop
- Admin AJAX doesn’t work in plugin admin page – Even though code is copied verbatim from WordPress Codex
- Add sub menu page in your plugin
- Create WordPress posts from JSON array using plugin in admin
- getting notifications about updates only in the “core” page
- Is there a better way of handling AJAX requests in WordPress?
- Ajax request sends url rather than data
- Calling PHP function with AJAX
- Ajax return 0 in plugin – ajax only used in wp-admin
- Getting 404 page not found error while trying to access add new plugin / themes
- admin panel save option with ajax
- Allow direct access to files/folders within WordPress to replace wp-admin
- Not applying update field (acf) in my plugin
- Adding a Taxonomy Filter to Admin List for a Custom Post Type?
- Create tabs inside Plugins Admin Page [closed]
- What are the best practices for updating?
- How to remove duplicate sub-menu name for top level menu items in a plugin?
- Removing an admin page added by a 3rd party plugin. Gravity forms in this example
- Custom admin column disappearing when using Quick Edit [duplicate]
- Loading shortcode with ajax
- Custom plugin settings: clicking “save changes” does not display success message
- wp-admin – save options without refreshing?
- how to not show plugin in admin area
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Getting “Fatal error: Call to undefined function wp_cache_get() in option.php” after updating a cache plugin [closed]
- Admin-ajax.php is dying “0” without processing function
- How can I get a list of plugins and which blogs are using them?
- How to remove an Ajax action
- How to set CORS header?
- Get Plugin Information from Multiple Sites Externally
- Edits to plugin not taking effect
- How do I remove the entire left nav bar in admin for certain level users?
- Weird problems after recovery from security breach
- How to Sort the Favorite Plugins Screen Alphabetically?
- Why plugin ajax response is -1?
- WordPress Ajax Callback
- plugin ajax to external php file always return null
- 404 Error on Activate / Deactivate Plugin
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- When to use action hooks and plugins
- Form isn’t inserting data into database with ajax plugin
- How to hide some section in WordPress under Post
- jquery not calling php function
- Plugin dependencies: show notice like theme plugins dependencies
- Polylang : Interverting languages after development [closed]
- WordPress + JavaScipt + AJAX + MySQL: insert query for form
- AJAX on Front-End Button Click not working – Custom Plugin
- How to handle WordPress Plugin Front-end AJAX Call [duplicate]
- Full list of registered scripts or styles, but from an admin options page
- AJAX Load more start with x posts
- WordPress Admin Menu defining function is seperate file
- How can I modify page content in the admin panel?
- WordPress front end AJAX. Return 0 :?
- How to do the simplest possible frontend ajax call from a plugin?
- in source code but I can’t find it in files or plugins
- Updating WordPress plugin admin panel footer text
- Asynchronous request in wordpress
- How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?
- Call Ajax URL in Plugin
- Calling a class method instantiated by ajax call in wordpress [closed]
- Why are plugin settings not all nested in one place?
- Loading by Ajax a plugin that also uses Ajax
- Edit page header on a custom plugin
- How to hide plugin options for editors via functions.php
- How can I adjust my function so the page editor still loads in the backend?
- Error datatable whit ajax
- WordPress Admin login redirect to homepage
- Continous audio play in pages
- admin-ajax.php not working properly on subdomains
- My ajax request don´t work and return 0
- Get content and send to 3rd party
- Plugin with AJAX on subdomains causes 404 in console
- Not getting result using ajax on wordpress
- wp-admin will not redirect to wp-login.php
- display user input using ajax in wordpress
- getpost content with all formatting for admin pages
- Plugin (smart archives reloaded) crashed site / no access on admin panel
- WordPress plugin ajax post parameter
- Response from Php File to Ajax is not getting sent
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- Load css classes after using ajax calls
- ERROR: Cookies are blocked due to unexpected output – no access to FTP
- Ajax in wordpress [duplicate]
- Need help with restricted page for users
- How do I call an action hook into wp_ajax hook callback function
- WordPress Plugin and other pages not opening
- warning wp session
- /wp-admin/plugins.php takes ages to load, and then 404s
- Display Any Field fromAdmin Panel in Frontend via Shortcode?
- How can I hide Dashboard notifications for just one particular plugin?
- Ajax response from Media Selection does not update ALL information more than once
- Simple ajax request with Vanilla JS keeps given 400 Bad Request