Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @mohejazi,

    You are unable to make the changes by default but you can hide the I am a customer option from the registration page. A few modifications is required.

    File location:wp-content/plugins/dokan-lite/templates/global/seller-registration-form.php
    Comment out line no: 60-63

    ` <label class=”radio”>
    <input type=”radio” name=”role” value=”customer”<?php checked( $role, ‘customer’ ); ?>>
    <?php esc_html_e( ‘I am a customer’, ‘dokan-lite’ ); ?>
    </label>`

    Use // to comment out. Make the changes using a child theme so that you do not lose the changes during an update. It is recommended to use a child theme during such modification. The mentioned article can be useful to you for the purpose.

    I hope this helps

    Hello,

    To keep the vendor registration form showing b default, you will need to modify a few details on the coding-end

    Try this code on your theme functions.php

    remove_action( 'woocommerce_register_form', 'dokan_seller_reg_form_fields' );
    add_action( 'woocommerce_register_form', 'dokan_custom_reg_vendor_selected', 12 );
    function dokan_custom_reg_vendor_selected() {
        $postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok.
        $role = isset( $postdata['role'] ) ? $postdata['role'] : 'seller';
        $role_style = ( $role == 'customer' ) ? 'display:none' : '';
        dokan_get_template_part( 'global/seller-registration-form', '', array(
            'postdata' => $postdata,
            'role' => $role,
            'role_style' => $role_style
        ) );
    }

    I hope this will help 🙂

    • This reply was modified 5 years, 2 months ago by roshni07.
    Thread Starter mohejazi

    (@mohejazi)

    Thank you for your Replay,

    it’s now hiding the Customer Radio and showing the Vendor Signup Form but I’m able to write only in the E-mail Address and Password Fields and all other Vendor Fields are disabled and not able to write on them.
    Can you please tell me how to fix that

    Thank you for your Support

    Thread Starter mohejazi

    (@mohejazi)

    I found the solution by removing the Class “show_if_seller” in File location:wp-content/plugins/dokan-lite/templates/global/seller-registration-form.php Line: 11

    is there any better solution or is that the Correct one?

    Hello @mohejazi ,

    It’s good to see that you have found the required file location and made the changes.

    Template overriding is the right step to disable the default settings on the registration form. You can save your modified file under – your-theme/dokan/global folder so that plugin updates do not remove your changes.

    Thank you 🙂

    Thread Starter mohejazi

    (@mohejazi)

    Thank you. 🙂

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Remove Im Customer Option’ is closed to new replies.