includes/class-freemius.php
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;
        }
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;
        }
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 ; }
Check if add-on installed and activated on site.

@author Vova Feldman (@svovaf)
@since  1.0.6

@param string|number $id_or_slug
@param bool|null     $is_premium Since 1.2.1.7 can check for specified add-on version.

@return bool
Check if add - on installed and activated on site .