includes/class-freemius.php
private function get_complete_upgrade_instructions( $plan_title = '' ) {
            $this->_logger->entrance();

            $activate_license_string = $this->get_license_network_activation_notice();

            if ( ! $this->has_premium_version() || $this->is_premium() ) {
                return '' . $activate_license_string;
            }

            if ( empty( $plan_title ) ) {
                $plan_title = $this->get_plan_title();
            }

            if ( $this->is_premium_version_installed() ) {
                /**
                 * If the premium version is already installed, instead of showing the installation instructions,
                 * tell the current user to activate it.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.1
                 */
                $premium_plugin_basename = $this->premium_plugin_basename();

                return sprintf(
                /* translators: %1s: Product title; %2s: Plan title */
                    $this->get_text_inline( ' The paid version of %1s is already installed. Please activate it to start benefiting the %2s features. %3s', 'activate-premium-version' ),
                    sprintf( '<em>%s</em>', esc_html( $this->get_plugin_title() ) ),
                    $plan_title,
                    sprintf(
                        '<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s</button></a>',
                        wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $premium_plugin_basename, 'activate-plugin_' . $premium_plugin_basename ),
                        esc_html( sprintf(
                        /* translators: %s: Plan title */
                            $this->get_text_inline( 'Activate %s features', 'activate-x-features' ),
                            $plan_title
                        ) )
                    )
                );
            } else {
                // @since 1.2.1.5 The free version is auto deactivated.
                $deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
                    ( '<li>' . $this->esc_html_inline( 'Deactivate the free version', 'deactivate-free-version' ) . '.</li>' ) :
                    '';

                return sprintf(
                    ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
                    $this->get_text_inline( 'Please follow these steps to complete the upgrade', 'follow-steps-to-complete-upgrade' ),
                    ( empty( $activate_license_string ) ? '' : $activate_license_string . '</li><li>' ) .
                    $this->get_latest_download_link( sprintf(
                    /* translators: %s: Plan title */
                        $this->get_text_inline( 'Download the latest %s version', 'download-latest-x-version' ),
                        $plan_title
                    ) ),
                    $deactivation_step,
                    $this->get_text_inline( 'Upload and activate the downloaded version', 'upload-and-activate' ),
                    '//bit.ly/upload-wp-' . $this->_module_type . 's',
                    $this->get_text_inline( 'How to upload and activate?', 'howto-upload-activate' )
                );
            }
        }
private function get_complete_upgrade_instructions( $plan_title = '' ) {
            $this->_logger->entrance();

            $activate_license_string = $this->get_license_network_activation_notice();

            if ( ! $this->has_premium_version() || $this->is_premium() ) {
                return '' . $activate_license_string;
            }

            if ( empty( $plan_title ) ) {
                $plan_title = $this->get_plan_title();
            }

            if ( $this->is_premium_version_installed() ) {
                /**
                 * If the premium version is already installed, instead of showing the installation instructions,
                 * tell the current user to activate it.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.1
                 */
                $premium_plugin_basename = $this->premium_plugin_basename();

                return sprintf(
                /* translators: %1s: Product title; %2s: Plan title */
                    $this->get_text_inline( ' The paid version of %1s is already installed. Please activate it to start benefiting the %2s features. %3s', 'activate-premium-version' ),
                    sprintf( '<em>%s</em>', esc_html( $this->get_plugin_title() ) ),
                    $plan_title,
                    sprintf(
                        '<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s</button></a>',
                        wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $premium_plugin_basename, 'activate-plugin_' . $premium_plugin_basename ),
                        esc_html( sprintf(
                        /* translators: %s: Plan title */
                            $this->get_text_inline( 'Activate %s features', 'activate-x-features' ),
                            $plan_title
                        ) )
                    )
                );
            } else {
                // @since 1.2.1.5 The free version is auto deactivated.
                $deactivation_step = version_compare( $this->version, '1.2.1.5', '<' ) ?
                    ( '<li>' . $this->esc_html_inline( 'Deactivate the free version', 'deactivate-free-version' ) . '.</li>' ) :
                    '';

                return sprintf(
                    ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
                    $this->get_text_inline( 'Please follow these steps to complete the upgrade', 'follow-steps-to-complete-upgrade' ),
                    ( empty( $activate_license_string ) ? '' : $activate_license_string . '</li><li>' ) .
                    $this->get_latest_download_link( sprintf(
                    /* translators: %s: Plan title */
                        $this->get_text_inline( 'Download the latest %s version', 'download-latest-x-version' ),
                        $plan_title
                    ) ),
                    $deactivation_step,
                    $this->get_text_inline( 'Upload and activate the downloaded version', 'upload-and-activate' ),
                    '//bit.ly/upload-wp-' . $this->_module_type . 's',
                    $this->get_text_inline( 'How to upload and activate?', 'howto-upload-activate' )
                );
            }
        }
private function get_complete_upgrade_instructions ( $ plan_title = '' ) { $ this -> _logger -> entrance ( ) ; $ activate_license_string = $ this -> get_license_network_activation_notice ( ) ; if ( ! $ this -> has_premium_version ( ) || $ this -> is_premium ( ) ) { return '' . $ activate_license_string ; } if ( empty ( $ plan_title ) ) { $ plan_title = $ this -> get_plan_title ( ) ; } if ( $ this -> is_premium_version_installed ( ) ) { /**
                 * If the premium version is already installed, instead of showing the installation instructions,
                 * tell the current user to activate it.
                 *
                 * @author Leo Fajardo (@leorw)
                 * @since 2.2.1
                 */ $ premium_plugin_basename = $ this -> premium_plugin_basename ( ) ; return sprintf ( /* translators: %1s: Product title; %2s: Plan title */ $ this -> get_text_inline ( ' The paid version of %1s is already installed. Please activate it to start benefiting the %2s features. %3s' , 'activate-premium-version' ) , sprintf ( '<em>%s</em>' , esc_html ( $ this -> get_plugin_title ( ) ) ) , $ plan_title , sprintf ( '<a style="margin-left: 10px;" href="%s"><button class="button button-primary">%s</button></a>' , wp_nonce_url ( 'plugins.php?action=activate&amp;plugin=' . $ premium_plugin_basename , 'activate-plugin_' . $ premium_plugin_basename ) , esc_html ( sprintf ( /* translators: %s: Plan title */ $ this -> get_text_inline ( 'Activate %s features' , 'activate-x-features' ) , $ plan_title ) ) ) ) ; } else { // @since 1.2.1.5 The free version is auto deactivated.
 $ deactivation_step = version_compare ( $ this -> version , '1.2.1.5' , '<' ) ? ( '<li>' . $ this -> esc_html_inline ( 'Deactivate the free version' , 'deactivate-free-version' ) . '.</li>' ) : '' ; return sprintf ( ' %s: <ol><li>%s.</li>%s<li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>' , $ this -> get_text_inline ( 'Please follow these steps to complete the upgrade' , 'follow-steps-to-complete-upgrade' ) , ( empty ( $ activate_license_string ) ? '' : $ activate_license_string . '</li><li>' ) . $ this -> get_latest_download_link ( sprintf ( /* translators: %s: Plan title */ $ this -> get_text_inline ( 'Download the latest %s version' , 'download-latest-x-version' ) , $ plan_title ) ) , $ deactivation_step , $ this -> get_text_inline ( 'Upload and activate the downloaded version' , 'upload-and-activate' ) , '//bit.ly/upload-wp-' . $ this -> _module_type . 's' , $ this -> get_text_inline ( 'How to upload and activate?' , 'howto-upload-activate' ) ) ; } }
Helper function that returns the final steps for the upgrade completion.

If the module is already running the premium code, returns an empty string.

@author Vova Feldman (@svovaf)
@since  1.2.1

@param string $plan_title

@return string
Helper function that returns the final steps for the upgrade completion .