Closed connorjburton closed 7 years ago
Okay, fixed a small bug, tested with V2 and it works. Not tested with V1 of WP REST API
This needs to be merged @chrishutchinson
At the moment, it fails on older WP installs due to (REST_API_VERSION)
actually getting returned as a string, hence true
here https://github.com/times/acf-to-wp-api/blob/master/acf-to-wp-api.php#L41
EDIT: It also fails on 4.4.2 with the old REST API plugin (1.3.5 currently)
Moves version retrieval to it's own function and removes need to manually check version numbers in
_getAPIBaseVersion
Not fully tested so will need testing.