rcp_process_manual_signup

Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.

If you need assistance with this, please reach out to our list of consultants for further assistance:
https://codeable.io/developers/restrict-content-pro/
Triggers after a “manual” payment signup is complete, but right before the user is redirected to the success page.
Parameters:

$member (RCP_Member) – Member object.

$payment_id (int) – ID number of the pending payment that was just created.

$gateway (RCP_Payment_Gateway_Manual) – Manual payment gateway object, which extends the RCP_Payment_Gateway class.

Example:
This example will automatically change the pending payment status to “complete” and activate the account. Note this means memberships will be activated before payment is verified.
function ag_rcp_auto_activate_manual_payments( $member, $payment_id, $gateway ) {

/**
* @var RCP_Payments $rcp_payments_db
*/
global $rcp_payments_db;

// Change payment status to “complete”. This also activates the membership.
$rcp_payments_db->update( $payment_id, array( ‘status’ => ‘complete’ ) );

}
add_action( ‘rcp_process_manual_signup’, ‘ag_rcp_auto_activate_manual_payments’, 10, 3 );

Have more questions?

Submit a request