New answers tagged

0

I read Codex document about get_user_meta... maybe it works. I made a test with the following code: <?php $user_last = get_user_meta( 51, 'billing_cpf', true ); echo '<p>The '. $key . ' value for user id ' . $user_id . ' is: ' . $user_last . '</p>'; ?> Someone nows how to get all values saved for all users? ($key = 'billing_cpf')


0

You should be using add_user_meta instead of update_user_meta: if (isset($_POST['billing_cpf'])) { add_user_meta($customer_id, 'billing_cpf', $POST['billing_cpf'], true); } As this will only add the meta if it does not already exist - no update. (This will prevent this field from being updatable - unless by you another way.) Note: normally you could ...



Top 50 recent answers are included