The way you’re using $wpdb->prepare
doesn’t help anything. You have to properly prepare the values and then add them like with sprintf
as %s
or %d
.
Oh, and I don’t believe “working with WP ajax for over a year.”. In this case you would also know about the nopriv
hooks for public usage 🙂
add_action( 'wp_ajax_nopriv_action_stats', ...
Related Posts:
- Ajax with jQuery UI dialog not working
- When to use action hooks and plugins
- WordPress Integration with Google Groups
- How to load wp_editor via AJAX
- Is it bad practice to create own table for a plugin?
- What are these entries in the database? Looks similar to JSON
- How does WordPress handle MySQL row lock errors?
- insert data in database table from plugin with WP3.1
- $wpdb->get_results leaking memory
- Is it a bad practice to go directly to the mysql database while developing a plugin?
- How can I pass a variable to wp_ajax action?
- Add image to post from external URL
- Create Proper WordPress Ajax Request in JavaScript, NOT jQuery
- Problem running Ajax in WordPress
- Custom database table for plugin not creating on activation
- Should I global $wpdb outside of any of my plugin’s functions scope?
- What’s the point of using WordPress’s built in admin-ajax.php?
- How to edit/delete single row items in a table on my own menu page
- AJAX image upload with a upload progress bar using media_handle_upload
- jQuery Plugin to use WordPress functions in AJAX request
- Ajax gives 400 error
- Unable to create new database table upon plugin activation using dbDelta
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Plugin Options Not Saving to Database in WP 4.5
- Doubt using $wpbd->get_col for a single column
- What’s the best way to implement AJAX in WordPress?
- WordPress Settings Lost After Site Migration
- How to put JQuery/Ajax inside shortcode?
- Help With MySQL to WPDB Query Conversion
- How to remove traces from widget during uninstallation
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Ajax with plugins returns 0
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- import posts with dutch/special letters
- Post Comments with Ajax in WordPress
- Better ads plugin has 500.000 entries in wp_postmeta
- How to create multiple database tables on plugin activation?
- after wordpress update to 3.5+ i get many errors in plugin wpdb::prepare()
- Render Modula Plugin Shortcode On Ajax Request
- How to handle WordPress Plugin Front-end AJAX Call [duplicate]
- AJAX Load more start with x posts
- WordPress front end AJAX. Return 0 :?
- Add some fileds to the wp_posts table
- Best/Correct way to add an option to a category
- Always get creating a new table with foreign key
- How to do the simplest possible frontend ajax call from a plugin?
- DB Query not working in Plugin
- Using custom php file for ajax url inside plugin
- Asynchronous request in wordpress
- How do I localize admin-ajax.php that is used in Ajax Load More – Infinite Scroll?
- Where do plugin variables live in the db?
- Call Ajax URL in Plugin
- Plugin: connect to external database without showing password
- Loading by Ajax a plugin that also uses Ajax
- Storing Form data in a different database
- How to add a custom form to a plugin’s setting page
- update_option creates an option, which empties on a blog reload
- More than one WordPress site using the same database – how to disable plugin for one site?
- How to call php file in theme directory from plugin
- What database state changes happen after a post is manually “updated” with no changes?
- Error datatable whit ajax
- Facing Problem with admin-ajax.php URL – Getting 404 with AJAX call
- Can i stream data to a custom_post_type?
- WP Ajax DB issues
- How do I add a medium to the WordPress database with my own plugin?
- jQuery Ajax not loading page with ACF fields
- Get Shortcode output to database for static post_content
- My wp database has been hacked
- How achive serving multiple concurrent Ajax / Rest calls in plugin?
- How to update a database entry with a wordpress plugin?
- How can I store user preferences in WordPress and retreive them later?
- Enable plugins that are “not supported”
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- My ajax request don´t work and return 0
- one admin for 2 wordpress websites
- WordPress update plugin through Dashboard/Plugins displaying error
- Need help for creating custom table on wordpress
- Show a table from data submitted by a form from a user
- display user input using ajax in wordpress
- Ajax, jQuery and WordPress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Contact Form loaded with Ajax
- How to load a plugin when doing an Ajax call? [duplicate]
- WordPress plugin ajax post parameter
- admin panel save option with ajax
- Insert data in custom table during new post creation
- Capturing POST data
- Pulling Advanced Custom Fields from other pages
- Response from Php File to Ajax is not getting sent
- How to submit the custom form data in database in WordPress without plugin?
- Plugin Admin Page Ajax-Admin call returning 0, URL set correctly. Implemented localized scripts but did not fix it
- Duplicator live to wamp https to http
- Load css classes after using ajax calls
- Is it possible to recover Deleted users?
- How to make a rest style plugin?
- WordPress portfolio pagination on home page
- wordpress Ajax success doesn’t return the value
- Text Wrapping in WPDataTables