# ACF 5.11 - Problem with get_field() from options

**URL:** https://discourse.roots.io/t/acf-5-11-problem-with-get-field-from-options/21705
**Category:** sage
**Tags:** acf, composer, sage10
**Created:** 2021-11-15T16:11:43Z
**Posts:** 6

## Post 1 by @grzesiek1owline — 2021-11-15T16:11:43Z

Hi!  
I am using Sage 10 with acf composer.  
After the last update of ACF PRO to version 5.11, there was a problem with reading the fields.  
I cannot read the values ​​of some fields. The return is **NULL**.

example in functions.php

```
$account_page = (is_array($account_page)) ? $account_page['url'] : $home_url;
define('ACCOUNT_PAGE', $account_page);
```

The same is the case with the php script that handles the form

```
session_start();

include 'vendor/autoload.php';
use Hybridauth\Hybridauth;

$google_login = (get_field('google-login-api', 'option')) ?? null;
```

How to fix this in acf-composer?

Issue in ACF GH - [get\_field returns null after upgrading to v5.11 · Issue #570 · AdvancedCustomFields/acf · GitHub](https://github.com/AdvancedCustomFields/acf/issues/570)

---

## Post 2 by @alwaysblank — 2021-11-15T16:22:23Z

The issue you linked indicates you’re trying to get the values of those fields before ACF knows they exist. You could adjust load order, or just get the field data with WordPress functions instead of ACF’s.

---

## Post 3 by @grzesiek1owline — 2021-11-15T17:35:06Z

I tried to change the priority in the register() function on acf composer, but unfortunately to no avail.

---

## Post 4 by @alwaysblank — 2021-11-16T03:23:14Z

Can you use `get_option('google-login-api')`?

---

## Post 5 by @grzesiek1owline — 2021-11-16T11:10:54Z

Yes, now its works. Thanks you!

---

## Post 6 by @system — 2021-12-27T16:12:02Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
