fixed it, there are some very silly mistakes, you could have just pointed out that to me, accessing the forum isn’t free it’s for premium members only. By the way mistakes were,
1. In the add action hook – there is space after ‘pmpro_save_membership_level ‘
2. and I am passing wrong value as priority argument, it should be any integer.
function custom_member_lvl_tbl_add_id($saveid) {
global $wpdb;
$update_array = array(
'total_area' => $_POST['total_area'],
'featured_area' => $_POST['featured_area'],
);
$condition = array(
'id' => $saveid
);
if ($saveid) {
$response = $wpdb->update('wp_pmpro_membership_levels', $update_array, $condition, array('%d', '%d'), array('%d'));
}
}
add_action('pmpro_save_membership_level', 'custom_member_lvl_tbl_add_id', 1, 1);
Thanks