function _after_code_type_change() {
            $this->_logger->entrance();

            if ( $this->is_theme() ) {
                // Expire the cache of the previous tabs since the theme may
                // have setting updates after code type has changed.
                $this->_cache->expire( 'tabs' );
                $this->_cache->expire( 'tabs_stylesheets' );
            }

            if ( $this->is_registered() ) {
                if ( ! $this->is_addon() ) {
                    add_action(
                        is_admin() ? 'admin_init' : 'init',
                        array( &$this, '_plugin_code_type_changed' )
                    );
                }

                if ( $this->is_premium() ) {
                    // Purge cached payments after switching to the premium version.
                    // @todo This logic doesn't handle purging the cache for serviceware module upgrade.
                    $this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
                }
            }
        }