includes/class-freemius.php
function _add_license_activation() {
            if ( ! $this->is_user_admin() ) {
                // Only admins can activate a license.
                return;
            }

            if ( ! $this->has_paid_plan() ) {
                // Module doesn't have any paid plans.
                return;
            }

            if ( ! $this->is_premium() ) {
                // Only add license activation logic to the premium version.
                return;
            }

            // Add license activation link and AJAX request handler.
            if ( self::is_plugins_page() ) {
                /**
                 * @since 1.2.0 Add license action link only on plugins page.
                 */
                $this->_add_license_action_link();
            }

            // Add license activation AJAX callback.
            $this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) );

            // Add resend license AJAX callback.
            $this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
        }
function _add_license_activation() {
            if ( ! $this->is_user_admin() ) {
                // Only admins can activate a license.
                return;
            }

            if ( ! $this->has_paid_plan() ) {
                // Module doesn't have any paid plans.
                return;
            }

            if ( ! $this->is_premium() ) {
                // Only add license activation logic to the premium version.
                return;
            }

            // Add license activation link and AJAX request handler.
            if ( self::is_plugins_page() ) {
                /**
                 * @since 1.2.0 Add license action link only on plugins page.
                 */
                $this->_add_license_action_link();
            }

            // Add license activation AJAX callback.
            $this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) );

            // Add resend license AJAX callback.
            $this->add_ajax_action( 'resend_license_key', array( &$this, '_resend_license_key_ajax_action' ) );
        }
function _add_license_activation ( ) { if ( ! $ this -> is_user_admin ( ) ) { // Only admins can activate a license.
 return ; } if ( ! $ this -> has_paid_plan ( ) ) { // Module doesn't have any paid plans.
 return ; } if ( ! $ this -> is_premium ( ) ) { // Only add license activation logic to the premium version.
 return ; } // Add license activation link and AJAX request handler.
 if ( self :: is_plugins_page ( ) ) { /**
                 * @since 1.2.0 Add license action link only on plugins page.
                 */ $ this -> _add_license_action_link ( ) ; } // Add license activation AJAX callback.
 $ this -> add_ajax_action ( 'activate_license' , array ( & $ this , '_activate_license_ajax_action' ) ) ; // Add resend license AJAX callback.
 $ this -> add_ajax_action ( 'resend_license_key' , array ( & $ this , '_resend_license_key_ajax_action' ) ) ; }
Prepare page to include all required UI and logic for the license activation dialog.

@author Vova Feldman (@svovaf)
@since  1.2.0
Prepare page to include all required UI and logic for the license activation dialog .