Thank you for your quick response but the same error occurred again with the code you provided and the plugin did not activate but when I tried the fix below the problem seems to be solved for now.
if (is_array($coin)) {
$name = $coin['name'] ?? '';
$symbol = $coin['symbol'] ?? '';
$id = $coin['id'] ?? '';
}
elseif (is_object($coin)) {
$name = $coin->name ?? '';
$symbol = $coin->symbol ?? '';
$id = $coin->id ?? '';
} else {
//If $coin is neither array nor object, skip it
continue;
}
if ($this->contains_emoji($name) || $this->contains_emoji($symbol) || $this->contains_emoji($id)) {
continue;
}