rcp_process_manual_signup

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 );