diff --git a/src/classes/class-tainacan-capabilities.php b/src/classes/class-tainacan-capabilities.php index 7fe656ca2..f9ae0dcd4 100644 --- a/src/classes/class-tainacan-capabilities.php +++ b/src/classes/class-tainacan-capabilities.php @@ -374,7 +374,11 @@ class Capabilities { if(! is_array($append_caps)) $append_caps = []; if( (! array_key_exists(self::$dependencies[$post_type][$cap], $append_caps) && $added ) || // we never added and need to add - ( $append_caps[self::$dependencies[$post_type][$cap]] === false && $added ) // we added but before is not need to add + ( + array_key_exists(self::$dependencies[$post_type][$cap], $append_caps) && + $append_caps[self::$dependencies[$post_type][$cap]] === false && + $added + ) // we added but before is not need to add ) { $append_caps[self::$dependencies[$post_type][$cap]] = 0; }