PHP Class Give_Email_Access, Give

This class handles email access, allowing donors access to their donation w/o logging in; Based on the work from Matt Gibbs - https://github.com/FacetWP/edd-no-logins
Since: 1.0
Mostra file Open project: wordimpress/give

Public Properties

Property Type Description
$error string Error
$token boolean Token
$token_email boolean Token email
$token_exists boolean Token exists

Public Methods

Method Description
__construct ( ) : void Class Constructor
can_send_email ( $customer_id ) : boolean Prevent email spamming
check_for_token ( ) : void Has the user authenticated?
create_columns ( ) : void Create בolumns
init ( ) : void Init
is_valid_token ( $token ) : boolean Is this a valid token?
is_valid_verify_key ( $token ) : boolean Is this a valid verify key?
send_email ( $customer_id, $email ) : void Send the user's token
set_verify_key ( $customer_id, $email, $verify_key ) : void Add the verify key to DB
users_purchases_args ( $args ) : mixed Users purchases args

Method Details

__construct() public method

Set up the Give Email Access Class.
Since: 1.0
public __construct ( ) : void
return void

can_send_email() public method

Prevent email spamming
Since: 1.0
public can_send_email ( $customer_id ) : boolean
$customer_id Customer id.
return boolean

check_for_token() public method

Has the user authenticated?
Since: 1.0
public check_for_token ( ) : void
return void

create_columns() public method

Create the necessary columns for email access
Since: 1.0
public create_columns ( ) : void
return void

init() public method

Register defaults and filters
Since: 1.0
public init ( ) : void
return void

is_valid_token() public method

Is this a valid token?
Since: 1.0
public is_valid_token ( $token ) : boolean
$token The token.
return boolean

is_valid_verify_key() public method

Is this a valid verify key?
Since: 1.0
public is_valid_verify_key ( $token ) : boolean
$token The token.
return boolean

send_email() public method

Send the user's token
Since: 1.0
public send_email ( $customer_id, $email ) : void
$customer_id Customer id.
$email Customer email.
return void

set_verify_key() public method

Add the verify key to DB
Since: 1.0
public set_verify_key ( $customer_id, $email, $verify_key ) : void
$customer_id Customer id.
$email Customer email.
$verify_key The verification key.
return void

users_purchases_args() public method

Force Give to find transactions by donation email, not user ID
Since: 1.0
public users_purchases_args ( $args ) : mixed
$args User Purchases arguments.
return mixed

Property Details

$error public_oe property

Error
Since: 1.0
public string $error
return string

$token public_oe property

Token
Since: 1.0
public bool $token
return boolean

$token_email public_oe property

Token email
Since: 1.0
public bool $token_email
return boolean

$token_exists public_oe property

Token exists
Since: 1.0
public bool $token_exists
return boolean