From e87a86b685dc8c3ae584c10d7892f7aeb73c6e9f Mon Sep 17 00:00:00 2001 From: osman sufy Date: Wed, 20 Nov 2024 08:17:33 +0600 Subject: [PATCH] check fields with ?? --- includes/Vendor/SetupWizard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Vendor/SetupWizard.php b/includes/Vendor/SetupWizard.php index f9a9f4a29..84dda3439 100644 --- a/includes/Vendor/SetupWizard.php +++ b/includes/Vendor/SetupWizard.php @@ -479,8 +479,8 @@ public function dokan_setup_store_save() { $dokan_settings['location'] = isset( $_POST['location'] ) ? sanitize_text_field( wp_unslash( $_POST['location'] ) ) : ''; $dokan_settings['find_address'] = isset( $_POST['find_address'] ) ? sanitize_text_field( wp_unslash( $_POST['find_address'] ) ) : ''; $dokan_settings['show_email'] = isset( $_POST['show_email'] ) ? 'yes' : 'no'; - $country = $dokan_settings['address']['country']; - $state = $dokan_settings['address']['state']; + $country = $dokan_settings['address']['country'] ?? ''; + $state = $dokan_settings['address']['state'] ?? ''; $country_has_states = isset( $states[ $country ] ) && count( $states[ $country ] ) > 0; $state_is_empty = empty( $state ); // Validating fileds. $is_valid_form = true;