How to push country value as defined ACF variable inside WordPress?

How to push value as defined ACF variable inside WordPress?

if(trim($user_ipinfo_country_code) != "DE") {
$user_outside_germany = true;
$wp->assign("user_outside_germany", $user_outside_germany);
   echo 'COUNTRY CODE1:'.$user_ipinfo_country_code."\n";
   //exit();
}

Is it compatible code in the line 3?

$wp->assign("user_outside_germany", $user_outside_germany);