Hey @nazmulhassann20
I solved it!
Step 1)
/wp-content/plugins/dokan-lite/includes -> template-tags.php open and edit;
Line 551:
function dokan_seller_reg_form_fields() {
$postdata = wc_clean( $_POST ); // WPCS: CSRF ok, input var ok.
$role = isset( $postdata['role'] ) ? $postdata['role'] : 'customer';
$role_style = ( $role == 'customer' ) ? 'display:none' : '';
dokan_get_template_part( 'global/seller-registration-form', '', array(
'postdata' => $postdata,
'role' => $role,
'role_style' => $role_style
) );
}
Replace with:
function dokan_seller_reg_form_fields() {
$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
) );
}
Step 2)
/wp-content/plugins/dokan-lite/assets/js -> vendor-registration.js open and edit;
Line 170:
$(function() {
Dokan_Vendor_Registration.init();
$('.show_if_seller').find( 'input, select' ).attr( 'disabled', 'disabled' );
Replace With:
$(function() {
Dokan_Vendor_Registration.init();
//$('.show_if_seller').find( 'input, select' ).attr( 'disabled', 'disabled' );
Save and default user role is VENDOR ??
(optional)
To remove the “I am a customer” button;
/wp-content/plugins/dokan-lite/templates/global -> seller-registration-form.php open and edit:
<p class="form-row form-group user-role">
<label class="radio">
<input type="radio" name="role" value="seller"<?php checked( $role, 'seller' ); ?>>
<?php esc_html_e( 'I am a vendor', 'dokan-lite' ); ?>
</label>
<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>
<?php do_action( 'dokan_registration_form_role', $role ); ?>
</p>
Replace With:
<p class="form-row form-group user-role">
<label class="radio">
<input type="radio" name="role" value="seller"<?php checked( $role, 'seller' ); ?>>
<?php esc_html_e( 'I am a vendor', 'dokan-lite' ); ?>
</label>
<!--
<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>
-->
<?php do_action( 'dokan_registration_form_role', $role ); ?>
</p>
-
This reply was modified 4 years, 11 months ago by HileciyizNET.
-
This reply was modified 4 years, 11 months ago by HileciyizNET.
-
This reply was modified 4 years, 11 months ago by HileciyizNET. Reason: final
-
This reply was modified 4 years, 11 months ago by HileciyizNET.
-
This reply was modified 4 years, 11 months ago by HileciyizNET.