Turns out that the $wpdb->update was running based on user being signed in via PHP. The variables that were placed into the condition statements were being ignored. To fix the issue I removed the $wpdb->update portion of the code from the ‘user is signed in’ condition and moved it to the ‘if empty’ conditional statements.
Related Posts:
- Click loads template via ajax
- Access/update database with jQuery
- How to speed up admin-ajax.php in wordpress
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- dynamic dependent select dropdown
- How to disable controls in theme customizer?
- Function won’t run onclick using Ajax
- Why i can’t get custom fields value or post ID via Ajax?
- Execute Jquery when a specific page in my plugin is loading
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- Ajax filter with loadmore button
- Update $wpdb query with AJAX
- How to call a function from functions.php with ajax?
- Find the method which AJAX GET calls
- ajax form function error
- AJAX: WordPress filters inside $html do not work as intended
- notify users when changed database
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- How can I fetch loop of post titles via AJAX?
- Retrieve POST data from AJAX call
- username_exists() function can’t be access without logging in
- Do I require the use of nonce?
- WordPress Ajax always returns a 404 error
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- problem with ajax and the path to the php page
- Can i check if user is doing any ajax request?
- How to use wp_localize_script in a WordPress page other than functions.php?
- Real time Duplicate title check
- ajax_object is not defined when ajax calls the function
- Returning a value from a PHP page
- Why is this Ajax not working?
- Stumped – Ajax Response Returns 0
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Sending jsPDF documents to the server
- Use ajax from function.php
- Ajax return code 400
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- doing an ajax request always outputs 0
- Prevent Data Resubmission On Page refresh
- How to test nonce with AJAX – Plugin development
- Woocommerce add to cart quantity buttons with AJAX
- Why is the post meta[] empty when I make a call to the wordpress rest api?
- WooCommerce – Reset quantity input field when variation changes
- class click counter save number
- Any possible way to make $wpdb->get_results() return anything else than array?
- get post based on category chosen in drop down – The ajax method
- Checking for new message using AJAX and PHP. Server overload?
- jQuery not defined
- AJAX request status 200 but no actual “response”
- Conditional Header in wordpress
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Trying to establish connection to External Database
- How to insert a single row to WP database table?
- wordpress count link clicks by ip address
- ajax, right way to do it and make it works?
- Ajax load more posts with multiple tax query
- How to store data from multiple forms using ajax and php
- WordPress Sending data to Ajax with select option
- PHP 8, AJAX mail form to function.php doesn’t work
- WordPress ajax doesn’t display object method on jQuery .change() function
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Ajax date_query not working past the first iteration
- Why ajax doesn’t work on certain wordpress hooks and reload the page instead?
- Why ajax doesn’t work on certain wordpress hooks?
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- AJAX pagination, update current page
- Save Search System
- adjust section according to country?
- populate form fields in a loop with ajax
- Change “add to cart” button color based on Woocommerce product category [closed]
- How can I get the values of my WordPress $wpdb query in Jquery?
- Ajax request returns ‘Array’. How to output the actual results?
- Ajax load more button for comments wordpress
- How to add a do_action on refreshing of WP customizer?
- Setting value of session with Ajax not working
- how to make custom ajax handler?
- [jQuery]Adding shortcode
- Display parent and child taxonomies in separate drop down select fields
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Plugins not working on AJAX requests
- Fancybox type popup window that’s not an iframe
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- How do I Import / Upload Files with jQuery AJAX?
- WordPress admin-ajax.php 400 bad request
- WordPress Ajax Call inserting data but success response false
- Ajax contact form return 0
- AJAX – Returning Two JSON Objects with One PHP Function
- Pull GetOption() variable into jQuery dynamically created html
- Display Data in Table from External Database in WP using Shortcodes
- is_user_logged_in() not working in AJAX validation call
- Unset session variable on page reload / setup but exclude AJAX
- Add Ajax Hooks and Call from Custom Template PHP
- WordPress Ajax Always returning 0
- Using data sent via AJAX in multiple functions on a WP plugin
- Theme not calling Jquery properly
- How to keep track of when a vote is cast?
- WordPress plugin admin page – using WordPress function in linked php file