Skip to content

Commit

Permalink
= 4.2.6.7 =
Browse files Browse the repository at this point in the history
~ Fixed: custom field has only field type checkbox, and require.
  • Loading branch information
tungnxt89 committed May 10, 2024
1 parent a97a52d commit 7e4ea95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-lp-forms-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public static function learnpress_create_new_customer( $email = '', $username =
}

$custom_fields = LP_Settings::get_option( 'register_profile_fields', [] );
if ( $custom_fields && ! empty( $update_meta ) ) {
if ( ! empty( $custom_fields ) ) {
foreach ( $custom_fields as $field ) {
if ( $field['required'] === 'yes' && empty( $update_meta[ $field['id'] ] ) ) {
throw new Exception( $field['name'] . __( ' is required field.', 'learnpress' ), 109 );
Expand Down

0 comments on commit 7e4ea95

Please sign in to comment.