diff --git a/civicrm-ux.php b/civicrm-ux.php index f3fb1ae..33f0968 100644 --- a/civicrm-ux.php +++ b/civicrm-ux.php @@ -9,7 +9,7 @@ * Plugin Name: WP CiviCRM UX * Plugin URI: https://github.com/agileware/wp-civicrm-ux * Description: A better user experience for integrating WordPress and CiviCRM - * Version: 1.20.5 + * Version: 1.20.6 * Requires at least: 5.8 * Requires PHP: 7.4 * Requires Plugins: civicrm diff --git a/shortcodes/contact/value.php b/shortcodes/contact/value.php index e5d17b0..94125db 100644 --- a/shortcodes/contact/value.php +++ b/shortcodes/contact/value.php @@ -77,13 +77,13 @@ public function shortcode_callback( $atts = [], $content = null, $tag = '' ) { if ( $labels['is_error'] ) { return $this->no_value( $result ) ? $mod_atts['default'] : $this->get_display_values( $result ); } - if ( $labels['values'][ $result ] ) { + if ( $labels['values'] ) { if ( is_array( $result ) ) { foreach ( $result as $key => $item ) { - $result[ $key ] = $labels['values'][ $result[ $item ] ]; + $result[ $key ] = $labels['values'][ $item ] ?? $item; } } else { - $result = $labels['values'][ $result ]; + $result = $labels['values'][ $result ] ?? $result; } }