Why json_decode() Returns null — and How to Fix It in WordPress
AJAX and JSON: json_decode() returns null in WordPress You pass an array from PHP with json_encode() through AJAX, and on the other side json_decode() returns null, or the data has the wrong types. In my case the cause was in the data itself: numbers that were strings instead of integers. Below is that case, and…