Home Forums Basel support forum function.php error

function.php error

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #8946



    I added a code snippet to the function.php that was supposed to add retype password field. I found this more than one outside forums. However, when I tried to update the file it yield an error:

    “Parse error: syntax error, unexpected ‘<‘ in /home/wishhy01/public_html/wp-content/themes/basel/inc/functions.php on line 1128”

    I deleted the added code and tried to update again but didn’t help. Interestingly there is no line 1128 in the entire file when I checked it on notepad.

    Attached is the function.php on a notepad. Also is the snippet.

    Totally devastated.

    I looked in the forums here but couldn’t find a way to do the password retype. Appreciate if you could give a solution once the above issue is fixed.



    As the files were not attached. I am adding the codes below.

    The added code:

    add_filter(‘woocommerce_registration_errors’, ‘register_errors_validation’, 10,3);
    function register_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
    global $woocommerce;
    extract( $_POST );
    if ( strcmp( $password, $secpassword ) !== 0 ) {
    return new WP_Error( ‘registration-error’, __( ‘Passwords mismatch.’, ‘woocommerce’ ) );
    return $reg_errors;
    add_action( ‘woocommerce_register_form’, ‘wc_r_password_repeat’ );
    function wc_r_password_repeat() {
    <p class=”form-row”>
    <label for=”second_pswd”><?php _e( ‘Password Repeat’, ‘woocommerce’ ); ?> <span class=”required”>*</span></label>
    <input type=”password” class=”input-text” name=”secpassword” id=”second_pswd” value=”<?php if ( ! empty( $_POST[‘secpassword’] ) ) echo esc_attr( $_POST[‘secpassword’] ); ?>” />


    Artem Temos


    Thank you for contacting us.

    Parse error means that you have some incorrect PHP code pasted to your PHP files. Simply remove it and restore our original theme files to make your website work correctly.

    Kind Regards

Viewing 3 posts - 1 through 3 (of 3 total)