SOLVED: WordPress Ajax JSON error: Invalid argument supplied for foreach()
So, you’re doing some WordPress AJAX. And maybe you’re serializing your form data into an array of objects. JSON.stringify() and fire that into wp-ajax.php. And maybe you console.log‘d it to verify it’s an array of objects… Cool. Maybe it looked like this (i.e. an array of objects): But then in functions.php, you json_decode() your lovely…