diff --git a/src/Modules/WPML/WPML.php b/src/Modules/WPML/WPML.php index b720c2a..0487d57 100644 --- a/src/Modules/WPML/WPML.php +++ b/src/Modules/WPML/WPML.php @@ -78,7 +78,7 @@ public function getConsentTypes($consentTypes) $code = (string)ICL_LANGUAGE_CODE; $filteredConsentTypes = []; - if (count($consentTypes)) { + if (is_array($consentTypes) && count($consentTypes)) { foreach ($consentTypes as $consentType) { if (isset($consentType['slug']) && ('privacy-policy' === $consentType['slug'] or 'terms-condition' === $consentType['slug'])) {