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
- What is the best way to ignore wordpress administration using add_filter($title) also when Ajax request
- Shipping Refund via Stripe Creates New Order Instead of Updating Original Order
- Admin Panel pagination link styles
- Is this the right way to execute some PHP in my plugin after a button click on an options page?
- Is there an easy way to flag posts in the admin area?
- AJAX search posts and pages
- WordPress Ajax Posting from App
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Show an image in my header.php
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- __callStatic method handler passed to add_action causes bug in PHP
- Display update notification messages like ‘What’s New’
- How to hide some section in WordPress under Post
- Using a custom plugin to capture input data via Ajax and PHP
- Default WordPress WP Editor removing style tags and html tag
- Ajax contact form widget plugin data not insert in database
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- Theme is Causing Ajax Conflicts for a plugin I cant identify it
- Why WordPress plugin url ajax doesn’t work?
- wordpress, search form using ajax
- jquery not calling php function
- Search for categories
- Admin accounts unable to see plugins from external IP
- How to allow an editor to edit all WordPress blog posts but have the last say as administrator?
- AJAX in plugin wp_send_json() sending html
- Facebook Messager Plugin
- Plugin dependencies: show notice like theme plugins dependencies
- Best place for if/else piece of code related to custom plugin?
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Polylang : Interverting languages after development [closed]
- WordPress wp-admin/network/plugin-install
- how to access all user dashboard on fronted page [closed]
- Ajax call returning 0
- How to set add question capability for author role in wp pro quiz plugin
- Ajax with plugins returns 0
- WordPress + JavaScipt + AJAX + MySQL: insert query for form
- Ajax fail and get 504 error
- Ajax Search Lite: Customize Autoscroll
- Is it possible make a back-end for WordPress with WordPress?
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- WordPress Integration with Google Groups
- Best place to load wp_ajax_the_ajax_hook action in plugin
- jQuery.post not working within shortcode – WordPress Ajax
- How to load wp_editor via AJAX
- How can I inject options into an select tag inside the widget form?
- Init plugin again after ajax call finish
- Dynamic admin submenu
- do_action() hook into load-(page)
- Display wordpress post’s in popup?
- Using AJAX to generate front end / viewer end pages
- Remove ‘Check Compatibility’ from Plugins menu
- Using color picker in plugin, does input attribute order matter?
- How to handle cookies from a WordPress plugin on a cached page?
- Ajax : Call undefined function plugin_function() … can’t call any plugin function
- How to change the name of the “edit my profile” link in the WordPress admin backend
- wordpress file upload with ajax when site is ajaxyfi
- Post Comments with Ajax in WordPress
- AJAX search as you type? [duplicate]
- Sync User to cPanel webmail?
- WordPress api call using wp-ajax returns error 400
- Adding CSS to custom post type admin page causes error
- AJAX call – failling to call do_action
- Add menu page issues (permissions & position)
- how to insert data in wordpress table usnig jquery ajax
- Using wpdb without loading all plug-ins via wp-load.php
- What are the Best Practises When Using AJAX in Plugin Development?
- Display Custom Field Value on Admin Page Column
- How to remove/hide Yoast’s “SEO” tab in admin panel?
- Network activating; if ( !current_user_can( ‘manage_options’ ) ) locks me out…
- Cannot access my wp-admin after installing Gzip compression [closed]
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- What’s causing this error? “Warning: Invalid argument”
- Call plugin with php function
- Render Modula Plugin Shortcode On Ajax Request
- Plugin settings won’t save changes
- AJAX on Front-End Button Click not working – Custom Plugin
- Is there any way to make myself an admin?
- How to handle WordPress Plugin Front-end AJAX Call [duplicate]
- Full list of registered scripts or styles, but from an admin options page