Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Assign level ID 1 after submission of form ID 1
<?php
function my_gform_after_submission( $entry, $form ) {
if ( ! function_exists( 'pmpro_changeMembershipLevel' ) ) {
return;
}
global $current_user;
$user_id = $current_user->ID;
pmpro_changeMembershipLevel( 1, $user_id );
}
add_action( 'gform_after_submission_1', 'my_gform_after_submission', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment