function is_addon_activated( $id_or_slug, $is_premium = null ) {
            $this->_logger->entrance();

            $addon_id     = self::get_module_id( $id_or_slug );
            $is_activated = self::has_instance( $addon_id );

            if ( ! $is_activated ) {
                return false;
            }

            if ( is_bool( $is_premium ) ) {
                // Check if the specified code version is activate.
                $addon        = $this->get_addon_instance( $addon_id );
                $is_activated = ( $is_premium === $addon->is_premium() );
            }

            return $is_activated;
        }