From 5b71a9b0ce2e197d723c273e5055c88cdb26d979 Mon Sep 17 00:00:00 2001 From: Connor Burton Date: Tue, 15 Dec 2015 12:34:53 +0000 Subject: [PATCH] Compatibility fix for V2.0Beta9 it seems REST_API_VERSION is now the way to get the version number. --- acf-to-wp-api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/acf-to-wp-api.php b/acf-to-wp-api.php index 3fe66f5..e6f825c 100644 --- a/acf-to-wp-api.php +++ b/acf-to-wp-api.php @@ -37,7 +37,7 @@ function __construct() { $this->plugin->url = WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__), "", plugin_basename(__FILE__)); $this->plugin->version = '1.3.2'; - $this->apiVersion = get_option( 'rest_api_plugin_version', get_option( 'json_api_plugin_version', null ) ); + $this->apiVersion = (REST_API_VERSION) ?: get_option( 'rest_api_plugin_version', get_option( 'json_api_plugin_version', null ) ); // Version One if($this->_isAPIVersionOne()) { @@ -539,4 +539,4 @@ function registerRoutes( $routes ) { } -$ACFtoWPAPI = new ACFtoWPAPI(); \ No newline at end of file +$ACFtoWPAPI = new ACFtoWPAPI();