Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter filippodotnext

    (@filippodotnext)

    up

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @filippodotnext!

    Is it possibile to automatically skip this phase and register the user assigning to him the role of “Vendor Admin” ?

    You can automatically approve the vendor using the following piece of code:

    function automaticallyApproveRegisteredVendors ( $vendorData ) {
      $vendorData['role'] = 'wc_product_vendors_admin_vendor';
      return $vendorData;
    }
    
    add_filter( 'wcpv_registration_default_user_data', 'automaticallyApproveRegisteredVendors', 10, 1);

    Here is how you can add custom code to your site the correct way:

    https://rynaldo.com/how-to-add-custom-code-to-your-woocommerce-wordpress-site-the-right-way/

    Cheers!

    Plugin Support Missy a11n

    (@m155y5)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to go ahead and mark this thread as resolved. If you have any other questions please feel free to start a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘After form submission automatically register a Vendor Admin’ is closed to new replies.