• I’m using the WC Vendors plugin and it only allows the user role to be “Vendor” if you want to allow someone to setup their own vendor store.

    I’d like to use S2Member to allow vendors to sign-up for a recurring paypal subscription to give them a better rate on their commission.

    Is it possible to configure S2Member to use an existing role (“Vendor” in this case) and still allow subscriptions to function based on custom capabilities and PayPal to work and continue to charge them as needed?

    https://www.ads-software.com/plugins/s2member/

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could use this plugin to add the Vendor role manually to members with a specific s2Member role.

    I’m wondering, though, if you could then also add an mu-plugin to automate the assignment of the Vendor role. I haven’t tested this, but it might work (assuming that the relevant s2Member role is level 1):

    <?php
    $blogusers = get_users( '&role=s2member_level1' );
    foreach ($blogusers as $user) {
        $u = new WP_User( $user->ID );
        $u->add_role( 'vendor' );
    }

    Adding a role to members one by one is tedious and not beneficial. It is 2015, and very few sellers want to pay for access and not have the ability to use it until the admin assigns it to them manually.

    Unfortunately I have this same problem and have yet to find a solution for this by default. It sounds so simple. Default “Vendor” or “Seller” instead of “subscriber”. I will try that code later in the day, and respond with results, but it does not look like any support is being offered on this thread or elsewhere.

    Did you happen to figure how to automate this process? I found this useful link that could help: I plan on using this to automate this process.

    I managed to solve this by hooking into BuddyPress bp_core_activated_user action hook and adding a vendor role from this hook. So a vendor role is added when user activates their account from the activation link that is sent by BuddPress via email to the registered user.

    Add this to the theme’s functions.php or you can add it as a must-use plugin

    function my_bp_core_activated_user( $user_id, $key, $user ) {
    $user = get_user_by('id', $user_id);
    $user->add_role('vendor');
    };
    add_action( 'bp_core_activated_user', 'my_bp_core_activated_user', 10, 3 );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatability with Woocommerce WC Vendors’ is closed to new replies.