is_premium = false; $this->is_live = true; if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) { $this->premium_slug = "{$this->slug}-premium"; } if ( empty( $this->premium_suffix ) ) { $this->premium_suffix = '(Premium)'; } if ( isset( $plugin->info ) && is_object( $plugin->info ) ) { $this->info = new FS_Plugin_Info( $plugin->info ); } } /** * Check if plugin is an add-on (has parent). * * @author Vova Feldman (@svovaf) * @since 1.0.6 * * @return bool */ function is_addon() { return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id ); } /** * @author Leo Fajardo (@leorw) * @since 1.2.3 * * @return bool */ function has_affiliate_program() { return ( ! empty( $this->affiliate_moderation ) ); } static function get_type() { return 'plugin'; } }