mycred_affiliate_cookie

Description

This filter allows you to change the lifespan of the cookies your users receive from the “Points for referrals” hook. By default the cookies lifespan is set to 24 hours.

Available since version 1.4.1

Parameters

Param Type Required Description
$lifespan int Yes

A unix timestamp when the cookie will expire. By default this is 24 hours from the current time.

$signup bool No

Indicates if this is for the signup (true) or the visitor (false) cookie.

$hook obj No

The Points for Referrals hook class object.

Used By

Package Prio. Description
Not used by any built-in package.

Examples

Example 1: Change the cookies lifespan from 24 hours to 1 year.