From d06f17c3d0ef91d2e0c14ef884aa31d336973e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rabbi=20Islam=20Rony=20=E2=9A=A1=EF=B8=8F?= <35329385+RabbiIslamRony@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:58:27 +0600 Subject: [PATCH] fix listing card label issue and removed unnessery function --- templates/archive/fields/phone.php | 7 +++++-- templates/single/action-section.php | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/templates/archive/fields/phone.php b/templates/archive/fields/phone.php index 2b4bc2531..1ab26b132 100644 --- a/templates/archive/fields/phone.php +++ b/templates/archive/fields/phone.php @@ -17,19 +17,22 @@ 'whatsapp' => $is_whatsapp, ] ); +$phone_label = ! empty( $data['original_field']['label'] ) + ? $data['original_field']['label'] + : ( ! empty( $data['label'] ) ? $data['label'] : $label ); ?>
- +
  • - print_label( $label ); ?> + print_label( $phone_label ); ?> diff --git a/templates/single/action-section.php b/templates/single/action-section.php index d50c47f9f..da831e20b 100644 --- a/templates/single/action-section.php +++ b/templates/single/action-section.php @@ -88,7 +88,9 @@ $phone_icon = ! empty( $action['icon'] ) ? $action['icon'] : 'las la-phone'; if ( $is_whatsapp ) : - $phone_label = ! empty( $action['form_data']['label'] ) ? $action['form_data']['label'] : __( 'WhatsApp', 'directorist' ); + $phone_label = ! empty( $action['form_data']['label'] ) + ? $action['form_data']['label'] + : ( ! empty( $action['label'] ) ? $action['label'] : '' ); ?> @@ -96,7 +98,9 @@