From 12167f8612e439529f97f9c5e0b65a0e8321b79f Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Sun, 2 Jul 2023 12:58:22 +0300 Subject: [PATCH] - fixed updating user description if there isn't custom field on profile form, but field is displayed on profile top; --- includes/core/class-form.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/core/class-form.php b/includes/core/class-form.php index e5b07c09..03eef6ae 100644 --- a/includes/core/class-form.php +++ b/includes/core/class-form.php @@ -493,6 +493,16 @@ if ( ! class_exists( 'um\core\Form' ) ) { $cf_metakeys[] = 'profile_photo'; $cf_metakeys[] = 'cover_photo'; + + if ( array_key_exists( 'show_bio', $this->form_data ) ) { + if ( ! emtpy( $this->form_data['show_bio'] ) ) { + $cf_metakeys[] = UM()->profile()->get_show_bio_key( $this->form_data ); + } + } else { + if ( UM()->options()->get( 'profile_show_bio' ) ) { + $cf_metakeys[] = UM()->profile()->get_show_bio_key( $this->form_data ); + } + } } // Add required usermeta for register. if ( 'register' === $this->form_data['mode'] ) {