Add tel user in admin booking dashboard

Hello, I can no longer connect to the support forum: 6 I just need to customize my admin dashboard on the reservations summary page, I display the columns I’m interested in but I can’t retrieve the information for the phone number of the user making a reservation request knowing that this “tel user” field I added as a mandatory custom attribute when: what is the metadata: user-tel or tel-user doesn’t work- here’s the code I used:

// Ajouter une colonne "Numéro de téléphone" à la page des réservations
function add_phone_column($columns) {
 $columns['user_phone'] = 'Numéro de téléphone';
 return $columns;
add_filter('manage_edit-hp_booking_columns', 'add_phone_column');

// Afficher le contenu de la colonne "Numéro de téléphone"
function display_phone_column($column, $post_id) {
 if ($column === 'user_phone') {
  $phone = get_post_meta($post_id, 'hp_user_phone', true);
  echo esc_html($phone);
add_action('manage_hp_booking_posts_custom_column', 'display_phone_column', 10, 2);

thank you


As we can see in the screenshot, you already have a column with your phone displayed, please check it in more detail. Also, please provide more information. Is this phone a Booking attribute or some other attribute, and what is its field name?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.