Giter Club home page Giter Club logo

pmpro-invite-only's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pmpro-invite-only's Issues

Invite code required only once (now it doesn`t)

Use case: invite code is needed only for base, free plan. But when user upgrade account to paid plan (without invite code) and this plan expires, he must sign up again into free plan and to have invite code again.
It would be nice if invite code was required only once in such cases or free plan was still in the user's account regardless of whether he buys an additional plan or not.

Add settings GUI instead of global variables.

For reference, here is an example of the settings currently set via globals and constants:

global $pmproio_invite_required_levels;
$pmproio_invite_required_levels = array(18,19);

global $pmproio_invite_given_levels;
$pmproio_invite_given_levels = array(17);	//defaults to $pmproio_invite_required_levels

define('PMPROIO_CODES', 10);	//defaults to 1

define('PMPROIO_CODES_USES', 1);	//defaults to unlimited

Instead of adding a Memberships -> Invite Only settings page or adding settings to the advanced settings page, I think we should add these all to the edit level page.

So on the edit level page, it would have a settings section:

Invite Only Settings
[ ] Require an invite code to checkout for this level.

[ ] Give members of this level invite codes.
How many times can codes be used: [ ] Leave blank for unlimited. (shows up if the give codes checkbox is checked)
How many: [ ] (shows up if the how many times setting is > 0)

We would be going from global setting (which makes sense in a lot of ways based on the current design of having codes that work across levels/etc) to settings per level. We don't need to at this time go completely down the rabbit hole of supporting different sets of codes for different levels. However, we should allow different levels to give different numbers of codes.

We should default to the global var settings if level specific settings haven't been set. So users who upgrade wouldn't even have to change the settings. When you view a level that hasn't had the invite only settings changed/set, you would set the options set based on the global settings.

To allow for this programatically. We should add wrappers to getting the settings. So a function like pmproio_getSettings($level_id) that would get settings for a specific level id. If there are no settings saved in options (or level meta) we would check the global vars, then return the settings.

Let me know if this makes sense. I'm open to discussion.

Lack of clear explanation of functionality

This plugin only create Invite Codes, if appropriately customized, when new member does checkout.
The invite code can be used for that new member to sharing with others.

I need to create INVITE CODEs for specific new users to getting into specific levels of membership.

In other words, I want to send a personalized invitation link for a member to be able to click and register on a specific level and only at that level.

Bug report: Invite Only Code Shows for Unapproved Members

When the approval add on is enabled, users are still given invite codes while pending approval.

Work around:

function pmpro_invite_approval_message() {
	if ( is_user_logged_in() ) {
		global $current_user;
		$user_id = $current_user->ID;
		if ( ! PMPro_Approvals::isApproved( $user_id, 1 ) ) {
			remove_filter( "pmpro_confirmation_message", "pmproio_pmpro_confirmation_message" );
			remove_filter('the_content', 'pmproio_the_content_account_page', 20, 1);
		}
	}
}
add_action( 'init', 'pmpro_invite_approval_message', 100 );

FEATURE REQUEST - Define unique amounts by level

Allow site owners to define the custom amount of codes and uses by level.
define( 'PMPROIO_CODES', 1 );
define( 'PMPROIO_CODES_USES', false);

Allow users to set different amounts by level... Example:
Level 2 gets 3 codes with 2 uses
Level 3 gets 10 codes with 1 uses
Etc.

Does Not Generate Initial Invite Code

When is the initial invite code generated?

Right now after activating and setting the array with the proper ID I see all the new fields in the profile and on the registration page...

None of my users have any invite codes populated. I have created new users, since activating and changed their membership levels... and nothing seems to kick off the generation of the invite codes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.