I solved it
instead of using
return ( $result == true ? 'success' : 'error' );
use
echo ( $result == true ? 'success' : 'error' );
Related Posts:
- Using wpdb without loading all plug-ins via wp-load.php
- Need help creating asynchronous data scraper in WordPress
- How can I make an Ajax login form work with FORCE_SSL_ADMIN enabled?
- Help making my pagination plugin better
- admin-ajax returning 400 error when request is made with Fetch API
- How to pass JavaScript variable to PHP in wordpress widget?
- jQuery AJAX call not executing in Plugin
- Errors while using ajax from external wordpress page
- I can’t access wordpress functions from an ajax php call
- Built in admin ajax hooks?
- delete_user_meta Delete one value out of array
- How to use wp-ajax in wp-cron
- $wpdb->get_results() does not fetch results with unicode ‘WHERE’ clause
- Calling shortcode in wp_localize_script strips result
- how to use ajax to display from database and load more in wordpress plugin
- Ajax with jQuery UI dialog not working
- Shortcode in AJAX popup
- $wpdb working with ajax but showing ajax error instead of success
- Why none of the plugins that have ajax doesn’t work in my website?
- Inserting large amounts of data into a custom table during plugin install
- Why do plugins that cause ‘unexpected output’ create AJAX problems?
- AJAX button run function
- Doubt using $wpbd->get_col for a single column
- How to put JQuery/Ajax inside shortcode?
- Help With MySQL to WPDB Query Conversion
- Using a custom plugin to capture input data via Ajax and PHP
- Problem with creating tables for Plugin
- Ajax contact form widget plugin data not insert in database
- woocommerce_package_rates not fired when wordpress woocommerce accessed as non ajax
- AJAX in plugin wp_send_json() sending html
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Ajax Search Lite: Customize Autoscroll
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Create tabs in admin options page from custom post type loop
- Post Comments with Ajax in WordPress
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Render Modula Plugin Shortcode On Ajax Request
- AJAX Load more start with x posts
- plugin shortcode not working on ajax request call
- wordpress add_action() issue in ajax call
- Ajax Plugin Not Echoing Response
- WordPress Ajax code is not Working
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Where Should i write the code for wordpress ajax voting?
- Remove value from array within post meta ajax admin
- Convert to shortcode?
- Is there a better way of handling AJAX requests in WordPress?
- Plugin not working locally, but works on server
- How to include my Ajax calls in one function instead of calling different ones every time?
- Using conditional staements to load plugins
- Ajax Call in page theme not working?
- WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version [closed]
- How to implement a plugin featuring foursquare like check-in
- Using AJAX to run SQL statement and populate dropdown
- Problem with ajax plugin for refreshing posts
- Ajax call not working in wordpress through a plugin
- can’t unzip file
- Ajax 400 error when used inside a plugin
- Strange admin-ajax / CSS / $_SESSION issue
- wp_query ‘s’ parameter does not work with WC_AJAX
- Jquery POST Ajax Return null data in wordpress
- ob_end_flush(): failed to send buffer of zlib output compression (0) in external php
- Facing Problem with admin-ajax.php URL – Getting 404 with AJAX call
- $wpdb->delete not working for me
- any word search WordPress
- In a plugin, How to update a json file using ajax
- Ajax Call not Working in Plugin
- jQuery Ajax not loading page with ACF fields
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- How to securely controlling data without keeping it in postmeta?
- How to use Datatable with Ajax when creating plugin on WordPress?
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- how can I edit the HTML of yith ajax product filter
- AJAX update fails for public/non-admin users
- checkout stripe with plugin contact form
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- Ajax response returns html code instead of user data
- Conditional Fields depending on checkboxes
- How to fix slow comment query?
- 504 Timeout gateway when trying to pay for an order in Woocommerce. What else can I do?
- Help with customising love it plugin (use within foreach)
- Ajax call fails and returns [object Object]
- wordpress ajax pagination object value does not change
- What’s the preferred method of writing AJAX-enabled plugins?
- using jquery serialize in ajax operation for plugin
- Action hook “wp_insert_post” works but not for last imported post
- Like/Dislike Bar not working when updating
- Ajax, jQuery and WordPress
- Ajax Not Working If The Handler is Located Outside Plugin Submenu Page Function
- get_var result empty for query of custom table in plugin admin
- Build and ajax plugin not work
- Trouble Removing Plugin [closed]
- How to change response of admin-ajax request?
- Ajax not working for logged in users
- Is it safe to increase/alter the size of the wp_post.guid column from VARCHAR(255) to VARCHAR(2048)?
- Advanced Ajax Page Loader and Masonry Grid
- How to create load more button without a plugin?
- $wpdb selects wrong database
- Ajax Called in Plugin php file
- How to check record is exist or not in WordPress CRUD Operation with $wpdb