Categories

Sunday, December 22, 2024
#919814419350 therichposts@gmail.com
Dokanmultivendor

How to remove shopname and shop url from the account migration form from dokan vendor registration?

How to remove shopname and shop url from the account migration form from dokan vendor registration?

Hello guys how are you? Welcome back to my blog therichpost.com. Guys today in this post, I will tell you How to remove shopname and shop url from the account migration form from dokan vendor registration?

Guys if you are new in WordPress or in WooCommerce then please check the below links for some good tutorials:

  1. WooCommerce Hooks
  2. WordPress Tricks
  3. WordPress Hooks
  4. Dokan

To remove the shop name and shop URL fields from the account migration form in Dokan vendor registration, you’ll need to customize the template or use a WordPress hook to modify the form. Here’s how you can achieve it:

Method 1: Using a Custom Code Hook

Dokan provides hooks to modify registration fields. Add the following code to your theme’s functions.php file:

function remove_dokan_vendor_registration_fields( $fields ) {
    // Check if it's the account migration form
    if ( isset( $fields['account_migration'] ) ) {
        // Remove shop name and shop URL fields
        unset( $fields['account_migration']['shopname'] );
        unset( $fields['account_migration']['url'] );
    }

    return $fields;
}
add_filter( 'dokan_seller_registration_required_fields', 'remove_dokan_vendor_registration_fields' );

Method 2: Overriding the Template

If the above method doesn’t fully remove the fields from the form, you can override the template.

  1. Locate the template: Dokan’s registration form template is located in the plugin directory: dokan-lite/templates/global/
  2. Copy the file: Copy the template file for the account migration form (e.g., form-migration.php) to your theme directory: wp-content/themes/your-theme/dokan/global/
  3. Edit the file: Open the copied file in a code editor and locate the sections for the shopname and url fields. Remove or comment out the corresponding HTML.
  4. Save and check: Save the changes and verify that the fields are no longer visible on the account migration form.

Method 3: Hide Fields with CSS

If you prefer not to modify code, you can hide these fields with CSS:

  1. Go to your WordPress dashboard > Appearance > Customize > Additional CSS.
  2. Add the following CSS:
.dokan-form-group.dokan-form-control[name="shopname"],
.dokan-form-group.dokan-form-control[name="url"] {
    display: none !important;
}

Notes:

  • Method 1 is more robust and ensures proper removal from the backend as well.
  • If you override templates, ensure to keep them updated with any changes in Dokan plugin updates.

Let me know if you need further clarification!

Guys if you will have any kind of query then feel free to comment below.

Thanks

Jassa

therichpost
the authortherichpost
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know WordPress, Core php, Angularjs, Angular 19, MedusaJs, Next.js, Bootstrap 5, Nodejs, Laravel, Codeigniter, Shopify, Squarespace, jQuery, Google Map Api, Vuejs, Reactjs, Big commerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.