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
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Real time Duplicate title check
- Load custom field value into div with AJAX
- Jquery ajax to custom php file: returning blank data
- How can I loop into two different DIVS without repeating the DIVs
- Can’t use get_results() in ajax query
- Display notification only once
- Passing jQuery value using Ajax to a page template
- ajax_object is not defined when ajax calls the function
- Stumped – Ajax Response Returns 0
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- Ajax return code 400
- doing an ajax request always outputs 0
- Prevent Data Resubmission On Page refresh
- Woocommerce add to cart quantity buttons with AJAX
- class click counter save number
- Any possible way to make $wpdb->get_results() return anything else than array?
- 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
- 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
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- populate form fields in a loop with ajax
- Setting value of session with Ajax not working
- how to make custom ajax handler?
- Plugins not working on AJAX requests
- WordPress Ajax Call inserting data but success response false
- Ajax contact form return 0
- AJAX – Returning Two JSON Objects with One PHP Function
- 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
- Using data sent via AJAX in multiple functions on a WP plugin
- Simple AJAX notification when the new post is added to the database
- How to make jquery count down timer function manually editable
- jQuery Ajax PHP function call returning [object Object]
- AJAX function not working [closed]
- what does $options = get_option(‘test_theme’); do?
- How to load previous or next attachment with jquery ?
- SQL error with custom query
- Validating an email input from form field before submit using JQuery, AJAX, and PHP
- How to set value selected using select2 jquery plugin
- Disclaimer that will show every refresh of the page
- WordPress cascading dropdown selection search based on Parent Page & Child Page
- Ajax on the Administration Side of plugin – wp_localize_script – how to pass value from JQuery to PHP function in class?
- jquery & ajax getting data from php in wordpress . admin-ajax.php returns 400
- How do I call a value from the datase using ajax
- Create a new account on site B with data from the purchase of site A
- Where to add my PHP codes for AJAX Jquery to work?
- Outputting post content to jQuery .html() string
- register_block_type is not working properly
- How to reload a php script, using AJAX and jQuery
- Woocommerce – if selected attribute term equals
- wp_set_object_terms returns 500 error when called through AJAX function
- How can i send id of the currently posted form data through json response in custom wordpress plugin?
- Cannot successfully execute AJAX script to call function.php specific function. Using XAMPP localhost to test
- getting the values of hidden inputs to use them in a php mysql query
- Remove item from post_meta array via AJAX
- How to call WordPress PHP file using external js file
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- Ajax not updating to database
- WordPress 404 when using AJAX to call php function
- wordpress ajax pagination
- how use php query in AJAX jquery
- Submitting my form to the database and then redirecting to payment site
- wp_delete_comment is doing nothing
- AJAX Not Working With WordPress Database properly
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- Pass the updated value of aid from form using ajax
- 500 (Internal Server Error) of external php file
- Use jQuery and AJAX to get HTML
- Problems with plugin that fetches data from database with ajax
- Dynamic Gallery
- Highlight posts currently being edited on multiple editor site?
- best way to communicate between php and jquery/javascript
- Loading a post’s content, into a div outside the loop, when it’s title is selected in a list
- Fatal error: Uncaught Error: Call to undefined function wp_nav_menu()
- Why not showing all post by default in my jquery filter
- Jquery autosave text area after typing
- Pass a PHP variable (loop-audio.php) to jQuery function (js/script.js)
- getJSON response to PHP