includes/class-freemius.php
function get_addon_basename( $id_or_slug ) {
            $addon_id = self::get_module_id( $id_or_slug );

            if ( $this->is_addon_activated( $addon_id ) ) {
                return self::instance( $addon_id )->get_plugin_basename();
            }

            $addon            = $this->get_addon( $addon_id );
            $premium_basename = "{$addon->premium_slug}/{$addon->slug}.php";

            if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
                return $premium_basename;
            }

            $all_plugins = $this->get_all_plugins();

            foreach ( $all_plugins as $basename => $data ) {
                if ( $addon->slug === $data['slug'] ||
                     $addon->premium_slug === $data['slug']
                ) {
                    return $basename;
                }
            }

            $free_basename = "{$addon->slug}/{$addon->slug}.php";

            return $free_basename;
        }
function get_addon_basename( $id_or_slug ) {
            $addon_id = self::get_module_id( $id_or_slug );

            if ( $this->is_addon_activated( $addon_id ) ) {
                return self::instance( $addon_id )->get_plugin_basename();
            }

            $addon            = $this->get_addon( $addon_id );
            $premium_basename = "{$addon->premium_slug}/{$addon->slug}.php";

            if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
                return $premium_basename;
            }

            $all_plugins = $this->get_all_plugins();

            foreach ( $all_plugins as $basename => $data ) {
                if ( $addon->slug === $data['slug'] ||
                     $addon->premium_slug === $data['slug']
                ) {
                    return $basename;
                }
            }

            $free_basename = "{$addon->slug}/{$addon->slug}.php";

            return $free_basename;
        }
function get_addon_basename ( $ id_or_slug ) { $ addon_id = self :: get_module_id ( $ id_or_slug ) ; if ( $ this -> is_addon_activated ( $ addon_id ) ) { return self :: instance ( $ addon_id ) -> get_plugin_basename ( ) ; } $ addon = $ this -> get_addon ( $ addon_id ) ; $ premium_basename = "{$addon->premium_slug}/{$addon->slug}.php" ; if ( file_exists ( fs_normalize_path ( WP_PLUGIN_DIR . '/' . $ premium_basename ) ) ) { return $ premium_basename ; } $ all_plugins = $ this -> get_all_plugins ( ) ; foreach ( $ all_plugins as $ basename => $ data ) { if ( $ addon -> slug === $ data [ 'slug' ] || $ addon -> premium_slug === $ data [ 'slug' ] ) { return $ basename ; } } $ free_basename = "{$addon->slug}/{$addon->slug}.php" ; return $ free_basename ; }
Get add-on basename.

@author Vova Feldman (@svovaf)
@since  1.0.6

@param  string|number $id_or_slug

@return string
Get add - on basename .