Description
API function to add an invite code.
Can add a code using default arguments or specific code attributes.
Parameters
$args
(array)(optional)
Return
Mixed – returns the invite code on success, otherwise false boolean
Useage
$args = array(
'invite_code' => 'The_Invite_Code', // Optional, will generate a value by default
'description' => 'A description of the invite code', // Optional
'uses_remaining' => 1, // limit times a code can be used. Optional, will default to null
'date_created' => 'YYYY-MM-DD 00:00:00', // MySQL timestamp format Optional, will set by default
'date_active' => 'YYYY-MM-DD 00:00:00', // MySQL timestamp format Optional, will set by default
'date_expired' => 'YYYY-MM-DD 00:00:00', // MySQL timestamp format Optional, will set by default
);
$invite_code = wpmem_ic_add_code( $args );