Populate coupon code on signup page from PHP session
Add this code to site.php file:
if (!isset($_SESSION['amember']['_signup_container'])) {
$_SESSION['amember']['_signup_container'] = array(
'datasources' => array(),
'values' => array(),
'valid' => array(),
'opaque' => array()
);
}
$_SESSION['amember']['_signup_container']['values']['page-0']['coupon'] = 'TEST';
You can replace TEST with your actual coupon code.