Wishlist Member Add/Remove Member from Levels Using Gravity Forms
-
Hi there,
I’m trying to create a function within functions.php that hooks into a Gravity Form submit action and then adds and removes membership levels for that user through Wishlist Member. So far I have not been able to get this to work, but here is my code so far:
add_action(“gform_after_submission_1”, “change_member_level”, 10, 2);
function change_member_level {
$user = wp_get_current_user();
$user_ID = array($user->ID);
$args = array(
‘Users’ => array($user_ID)
);
$level_ID = 1340726008;
$members = wlmapi_add_member_to_level($level_ID, $args);
print_r($members);
}Any ideas on what I’m doing wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Wishlist Member Add/Remove Member from Levels Using Gravity Forms’ is closed to new replies.