WP Manifestindependent plugin directory
manifest / users / mos-uap-fix

MOS UAP Fix

Hacky fix for UAP plugin (Indeed Ultimate Affiliate Pro)

by MinKaizen · github.com/minkaizen/mos-uap-fix · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/minkaizen/mos-uap-fix/archive/refs/heads/main.zip

Readme

MOS UAP Fix

Description

Fixes a broken feature from the plugin Ultimate Affiliate Pro (by Indeed). Namely:

  • Creates sponsor-downline relationship on user registration

Requirements

  1. Ultimate Affiliate Pro needs to be installed and activated.
  2. PHP >= 7.4
  3. ReWrite Referrals enabled (WP Dashboard > Ultimate Affiliate Pro > Extensions > ReWrite Referrals)

Note: If migrating from a new site, some required tables might not be available, causing a fatal error. In this case, simply deactivate and reactate the Ultimate Affiliate Pro plugin.

Quickstart

Simply install and activate the plugin. This plugin comes with sane defaults, but can be configured. See configuration

Configuration

Settings can be configured by going to WP Dashboard > Settings > UAP Fix

Available settings and their defaults:

Affiliate Link Parameter Name

Default value: id

The name of the query parameter inside the affiliate link. This can be any arbitrary name of your choosing, as long as it's url-safe (only letters, numbers and underscores).

For example, if this is set to id, then affiliate links need to include ?id= or (if it's not the first parameter) &id=. For example: https://www.yoursite.com/?id=someone or https://yoursite.com/?other_param=hello&id=someone

Note: Changing this value is essentially changing the affiliate link. Use with caution.

Affiliate Link Parameter Identifier

Default value: username

Available options: username, wpid, email

Which user field should be used inside the affiliate link after the ?id= in the affiliate link.

Note: Changing this value is essentially changing the affiliate link. Use with caution.

Cookie Expiration (days)

Default value: 360

Available values: Any positive integer. If set to 0, the cookie will expire as soon as the browser is closed or the user leaves the page.

The number of days after which the cookie should expire. This is the cookie that credits a sign up to an affiliate.

Note 1: Changing this value will not affect the current cookies stored on a user's device. It will only affect future cookies generated by the affiliate link.

Automatically make new user affiliate

Default value: false

Whether or not a new user should automatially be considered an "affiliate".

Note: This functionality required for the sponsor-downline relationships to work, but this particular functionality is already inside UAP and is currently not broken. If in doubt, disable this option UNLESS this particular setting is OFF or not working inside UAP.

How it works

Under the hood, this plugin does 3 things:

  1. On any site visit, check the URL for the affiliate parameter (e.g. ?id=martin). If present, generate a cookie that stores the sponsor's Wordpress ID
  2. On user registration, check if a cookie is present. If it is, create the sponsor-downline relationship.
  3. (If setting is enabled) Automatically affiliate new users

Read the full README on GitHub →