It’s not too elegant, but I had a similar issue and came up with the following solution.
In json-api.php, add the following right below the plugin info section:
if (!isset($_GET['custom_fields'])) {
$_GET['custom_fields'] = 'customfield1,customfield2,customfield3';
}
Renaming the customfields with your field names, of course.
This should make the plugin think that it’s being passed that query string on every load.
You are a hero – thank you for your help!
This is the code I previously had:
[code moderated according to forum rules - please use the pastebin]
With that, the page doesn't load at all. Thanks for your help!