WP Referral Code


WP Referral Code is a WordPress plugin that helps you generate a unique referral code for each of your users, enabling you to start your own version of referral marketing. Upon user registration, the plugin captures the refer code automatically. Additionally, WP Referral Code provides a user-friendly “copy refer link box” that allows users to easily copy and share their referral link.

This plugin is dependent only on the WordPress core and can be used with all other plugins. However, the logic after successful referral registration is up to you. To help with this, two important hooks are provided. For more information on how to use them, please refer to the plugin documentation, which can be found on the plugin website Documentation.

Several shortcodes are available to help you place things where they need to be. A list of these shortcodes can be found in the plugin options.

All information related to the referral status of a user can be found on the user edit page (Dashboard->Users->select a user). Here, you can view how many users the user has invited and who they were referred by.


  • Copy link shortcode example
  • Options page
  • List of shortcodes
  • Managing referrals in User edit page


note: on activation plugin will create refer codes for all of your users.


29 de abril de 2023
I’ve been searching for a plugin that can do this forever! Thanks you so much! It works like a charm! Keep up the good work!
21 de abril de 2023
Wonderful plugin, especially if you’re willing to use it as a base and add some code around. It has minimal functionalities but it can be all that you need.
25 de noviembre de 2022
This plugin crashed my website.. for me is pure shit!
21 de marzo de 2021 1 respuesta
The plugin is very potential but there are still many weaknesses that need improvement. Thanks to the author for creating this awesome plugin.
Leer todas las 9 reseñas

Colaboradores y desarrolladores

Este software es de código abierto. Las siguientes personas han contribuido a este plugin.


Traduce “WP Referral Code” a tu idioma.

¿Interesado en el desarrollo?

Revisa el código, echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios


  • UI enhancements.


  • Update styles to support more themes.


  • Redesign copy link box, fix minor bugs.


  • Minor fix to remove spaces around refer link in copy ref link box


  • Fix: Make more statements translatable.
  • Document: Add new shortcode to shortcodes list.


  • Feature: New shortcode [wp-referral-code var=”most_referring_users”] shows users with most referring


  • Fixed: Prevent submitting himself and already referred user.


  • Minor bug fix, correctly loading styles.


  • Add support for PHP 8.*


  • You can now manually add referral relation for users.
  • Check user edit page (WordPress admin -> users -> select a user -> scroll down) to see the new Add button.


  • General fixes and refactors


  • Fix a bug related to updating/setting custom refer codes


  • new feature which allows setting custom refer code for users, See the new filed in edit user page


  • show referral data in users table


  • new feature to remove referral relation in user edit admin page


  • update tested up to version: 5.7
  • fix copy box shortcode not rendering in some page builders.


  • New option to set ref code expiration time
  • New shortcode to show invited users list in frontend. new hooks to customize list’s look.
  • New important filter to modify ref code on registration (‘wp_referral_code_new_user_ref_code’) which makes it possible to capture possible refer code value from registration form or other sources.
  • minor bug fixes and performance improvements
  • -Many thanks to Stefano (@sdotb) for testing and reviewing plugin


  • this update ensures values in the invited users list are unique.


  • This minor update includes code improvements and some new hooks to make the plugin easier to extend by developers. no breaking changes.
  • add new filter ‘wp_referral_code_validate_submission’ to control wheter refer data should be submited to database.
  • new helper function ‘wp_referral_code_add_user_to_referrer_invite_list($user_id, $referrer_id)’


  • First version