Home Forums Plugin or Theme Compatibility Paid Membership Solution

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 46 posts - 1 through 46 (of 46 total)
  • Author
    Posts
  • #7970
    Anna
    Member

    I’ve seen a lot of posts lately regarding the implementation of a paid membership (monthly, yearly, etc.) in conjunction with WC Vendors. I have also been working on this function for our site.
    I thought I would share what I was able to implement so that our site could have a choice of a paid membership in order to enable vendor capabilities.

    The challenge was setting up a membership plugin so that it would automatically upgrade a subscriber to the essential vendor role. Most membership plugins will not automatically switch roles upon successful membership payment; nor will they allow the use of an already created role that is not a standard wp role or a role that the membership plugin defines.
    My other challenge was finding a way to accept membership payments that did NOT involve pp. We use Stripe.
    ……………………………………………………….
    -Paid Memberships Pro plugin. You can use the free version.

    – Set up your membership level or levels.

    – Add code in your theme or child theme functions.php . This code will enable automatic upgrading to a vendor role upon completion of the first membership payment. In addition, if a member wishes to downgrade or cancel the membership (close shop, essentially), it will then downgrade the member to a subscriber role upon cancellation. Also enables admin ignore. You will have to get the level numbers and roles to match your site. You can have this switch to different roles other than vendor- whatever the roles are on your site that you wish to have assigned to a paid membership.

    In my case, I have a monthly and a yearly membership level choices. Each is upgraded to vendor, I just wanted members to have a choice of monthly or yearly payment plans to open a shop.

    https://gist.github.com/fervous/9ae6e29b59581ac7559f#file-pmp-and-wc-vendors

    #7972
    Anna
    Member

    Why can I never paste code correctly? :_(
    Ben/Jamie.. how do you paste the box with the gist straight into the forum post? I was not able to do so.

    #7973
    WC Vendors Support
    Participant

    https://gist.github.com/fervous/9ae6e29b59581ac7559f

    There ya go. 🙂 You were pasting the .js file, not the gist link.

    #7976
    WC Vendors Support
    Participant

    Looks good! Nice use of the actions for that plugin. Thanks for posting this up.

    #20884
    Tony
    Participant

    I tried this and it is not ignoring my admin account. If i go to the membership account page it asks me to pick a membership

    #20889
    Anna
    Member

    Hi, Tony-
    If it is ignoring your admin account, than you would not have a membership as an admin. Correct?
    What do you want it to do to your admin account? An admin cannot be a vendor…. so I am just wondering what you had hoped to see from this. Did you pay for a membership to your own site as an admin? I have it ignore the admin so as to NOT mess with that role AT ALL.

    It is designed to help automatically switch a regular member to the VENDOR role upon successful completion of the paid membership selection. That way you do not have to go in and manually change someone over to a vendor when they have paid. It just makes it easier. In turn, if a vendor downgrades to a non-paid member, then they are automatically switched to a “SUBSCRIBER” and don’t have vendor privileges any more.

    I’ll try to help if you can let me know what you had wanted this to do when “ignoring” the admin. I wanted this to do absolutely nothing to admin. Therefore, yes- when admin visits the membership account page, it WOULD tell you to pick a membership, since it had ignored the admin role for upgrading. 🙂

    #20919
    Tony
    Participant

    Well I understand that part now. I need to have a free membership option for customers

    #24215
    Mark
    Participant

    Anna,
    Thanks for the code. It worked great for me. I had two additional related scenarios that maybe you could help me with, as I’m not a good coder. I could send you my email, if you prefer to work offline of the forum.

    1. Once our members join as a “vendor” level, open a shop, create products, and then downgrade their membership to “free” subscription, all of their products are still visible in my site catalog. Does that still happen on your site. I would like to make all of that members products “invisible” if they downgrade to free subscription, and then “visible” again if they upgrade back to a vendor level in the future.

    2. I have three membership levels (free subscriber, and two vendor membership levels). I would like to have a different commission percentage for each of vendor memberships. Ben suggested we could use their filter “wcv_commission_rate” as outlined in this example code: https://www.wcvendors.com/kb/commissions-fixed-dollar-amount-fixed-plus-percentage/

    Thanks for any help or advice

    #25689
    Karen Thomas
    Participant

    Thank you so much for sharing your hard work Anna @fervous! It’s something I’m going to need to do in the future so I’ve favourited! Woo hoo to you coding!! 😀

    #25699
    Anna
    Member

    @ConsciousCrafties Cool- if it helps, then YAY! I’ve had to change things a bit because I’ve decided to have a paid option and a free option for the vendors … with different commission amounts for each. Otherwise, it seems to work without hitches for now. Paid membership pro updates A LOT so I am always testing this to see if it still works before pushing an update on my live site.

    Which kinda brings me to the question that @mtgame21 asked…. first of all, I’m sorry I did not see your question until now. 😮
    I wish I could help more… but I am also still trying to work out a way to automatically provide the vendors with different commission rates. Ideally, when a vendor decides to switch form a free vendor membership with a higher commission rate to a paid membership with a lower commission rate, I’d like the rate to automatically switch. My head blew up when I tried to figure out how to do this via the code Ben shared https://www.wcvendors.com/kb/commissions-fixed-dollar-amount-fixed-plus-percentage/ using the wcv_commission_rate … and then to work that into paid membership pro…. I just haven’t taken that one on yet. ;-). So, for now, I’m manually switching the commission rate for the vendors in admin when I see that they have they signed up for a monthly paid membership. I’ve left the free membership commission rate as my default filled in on the wc vendors pro admin.

    As for the products still showing in the marketplace after a vendor downgrades…. I did NOT have that happen with my initial testing but I will go now and see if something has changed and if this needs another function added to the code. Again.. PMP updates quite often, so perhaps this needs some adjustment now.

    #25703
    Mark
    Participant

    @Anna,
    Thanks for responding. Where would I go to manually switch the commission rate for specific vendors? I cant remember where I saw it before? I’m new to coding in PHP and tried to hack my way through it ( Ive programmed in other languages some time ago :)).

    Here is link to another forum thread where I was discussing changing the commission rate using your code and the wcv_commission_rate example Ben provided in that link referenced above. I was trying to mash them together but was making some rookie mistakes LOL. Some of his feedback in that thread may/may not help you.

    WC Vendors (Ben) is too swamped for a custom request right not. I’m willing to pay someone else but haven’t yet found a developer that had a reasonable quote, based on Ben saying that this shouldn’t be that difficult. Do you have a developer contact that you trust/work with, perhaps we can share the costs to get this solved? I also posted some questions about this on the PMPRO forum yesterday, I’ll let you know if I get any useful feedback.

    As for the products still showing in the marketplace after a vendor downgrades….Im going to retest that scenario again in see if that’s the case still for me also, since there have been many plugin update since the last time I checked. I’ll repost in here after I test that again.

    #25707
    Anna
    Member

    @mtgame21
    I appreciate you sharing what you’ve learned so far. Unfortunately I have had a very hard time with developers so far, so I do not have someone I can suggest at this point. PMPRO may be able to give us something to work with, so good idea on contacting them. Actually the idea of the code above came form PMPRO and I adjusted it. So hopefully they can help somehow.

    I’m hacking away here, too. Seriously, I’ve had to just try and try and learn. It is difficult, but each time I try I learn something. When I took on my site, I thought I’d get it done in a couple of months. LOL! nope.. I just launched last week, 11 months after I started this process. I can do css… but php and js are two entirely new languages to me. I’m not fluent yet… but I can ask, “where is the bathroom?” in php now. 😉

    The downgrade/removal of products shouldn’t be a hard thing to fix. I will definitely look at that, and also PMPRO can probably help on that one, too.

    Here is a screenshot showing how to adjust the individual vendor commission. You just go to the user (WP ADMIN > USERS > the user you want to adjust). Then you scroll down until the PRO COMMISSION options (NOT the Wc Vendors commission) in the user’s admin screen… as shown below, you can adjust the commission to whatever % you wish.

    I’ll be doing some more work on these features so I will definitely let you know if I have any breakthroughs, too. I just had to get my site launched and focus on more immediate needs lately. Now I can go back and work on some fine tuning. 😉

    Thanks again, Mark.

    #25710
    Mark
    Participant

    @Anna,

    Sounds good. Also, since you are ahead of me in already launching your site, if you don’t mind, would you email me at [email protected] and then I will reply back to you with my main email address. If so, I will reply to your email by tomorrow.

    I have a few general questions that I’m sure you already worked through or understand in pulling the whole site together or how things work. Nothing to do with coding, but if you don’t want to exchange emails, then I could just post them in the this or another thread.

    Thanks

    #25766
    Anna
    Member

    @mtgame21
    I sent you a PM. 🙂

    #25787
    Mark
    Participant

    @Anna,

    I tested again and I still have the problem with downgraded members. I added a new “demo1” user, and selected the “vendor” membership account. Then went into the WC Vendors Dashboard and added a product I’ll call “APPLE”. Went to my shop catalog on the front end, and the APPPLE product for “demo1” is there, which is correct.

    I went to the WordPress/Dashboard/Products and can see the APPLE product created by demo1 user in the list. Next, I changed demo1 to a “subscriber” membership on the front end, which takes away all of his access to the Wc Vendors Pro Dashboard. I go back to WordPress/Dashboard/Products and can still see the APPLE product created by demo1 user in the list. Also on the front end shop catalog, the product “APPLE” still appears.

    To summarize, a person signs up as a “vendor”, can create products, then changes their membership to “subscriber”. and there product still exists/shows up in the catalog. Does it do the same thing for you?

    #25788
    Mark
    Participant

    Additional info,
    Next I tried to purchase that “APPLE” product while “demo1” user was still a “Subscriber”. I was able to purchase it, but it did not send a commission to “demo1”

    I guess our options are when a member downgrades, is either delete all the products that member created or change the Visibility of each of their products from “Catalog and Search” to “Hidden”. Of Course, don’t want to do this manually 🙂

    @Ben,
    Have you had anyone else ask about this same scenario or problem?

    #25789
    WC Vendors Support
    Participant

    Have you had anyone else ask about this same scenario or problem?

    Yes, but I’ve mostly ignored them since it’s not part of WC Vendors Pro yet. 🙂

    #25790
    Anna
    Member

    Yep, it does the same thing for me.
    I’ll see if there is an automatic way to deactivate the product listings when someone switches…. today I do not have the time to delve into it. In the meantime, we can manually deactivate or delete the listings when someone downgrades… but yeah, It’d be a lot more convenient to have it happen automatically, for sure. 😉

    #25791
    WC Vendors Support
    Participant

    You could loop through the posts and where post_author = vendor ID, and post type = product, set the status to draft, or hidden, or private, or whatever you want.

    #26339
    Mark
    Participant

    Ben,
    I have doing research and confused on the correct way to start/create this loop. Can you help me setup the initial loop.
    If I have that, I believe I know how to set the status to draft, or hidden, or private, etc… Thanks

    #26341
    WC Vendors Support
    Participant

    Sure, you’d start it with get_posts.

    https://codex.wordpress.org/Template_Tags/get_posts

    And of course, make sure you search post_type = product

    Cheers

    #26361
    Mark
    Participant

    OK here is my first attempt that didn’t work…any ideas? Note, the #user_id variable is defined already into a function that Im inserting this code into.

    //Grab all product post for this $user_id, and change catalog visibility to hidden
    $args = array(
    ‘post_type’ => ‘product’,
    ‘author’ => $user_id
    );
    $user_product_posts_array = get_posts( $args );

    foreach ( $user_product_posts_array as $product_obj) {
    $product_obj -> visibility = ‘hidden’;
    }

    #26372
    WC Vendors Support
    Participant

    Debugging that one is all you! 🙂 Not enough time in the day for custom coding this deep in. Keep at it, and use the codex for a reference.

    #26382
    Anna
    Member

    @mtgame21

    I’ll be able to work with you on this on the weekend.

    I do think that maybe writing a separate function for the “hidden” products would be better than trying to wrap this into the piece of code which determines the member role on completion of the paid membership.

    I can completely appreciate how frustrating it is to keep working with code and have it not work out- as well as how great it feels when you finally get something to work as intended! 🙂

    #26383
    Mark
    Participant

    OK, I’ll keep trying and if/when I figure it out, I will post in here to help out the next guy trying to do the same thing

    #36747
    HawwaC
    Participant

    Has anyone found a solution to this problem? Or will wcv be including a membership option sometime soon?

    @ben ?

    #36758
    WC Vendors Support
    Participant

    We dont have any *immediate* plans to include a membership option, since third party plugins already exist that do it. There’s probably a dozen of them at this point. WooCommerce Groups is by far the easiest way to do it, and I’ve detailed how to many times on the forums here in the past…. When we have a bit more of an open schedule for developing and finish up all the other stuff then it’s something we can revisit later. We just dont like reinventing the wheel when the wheel already exists and works just fine.

    #38031
    topher
    Participant

    I’m using this solution currently with the buddyboss theme. Still in the testing stages but I just noticed that the permissions were not being granted to the Vendors to upload images. Don’t know if this is something that’s already been mentioned but to fix the problem I added a bit to your set_role code (which I borrowed from: Resetting the Vendor & Pending Vendor Roles). I’ll let you know if I run into any issues but so far so good.:

      if($level_id == 1)
      {
        //New member of level #1. Give them Vendor role.
        $wp_user_object->set_role( 'vendor', 'Vendor', array(
          'assign_product_terms'     => true,
          'edit_products'            => true,
          'edit_product'       => true,
          'edit_published_products'  => false,
          'manage_product'           => true,
          'publish_products'         => false,
          'read'                     => true,
          'upload_files'             => true,
          'view_woocommerce_reports' => true,
          ) );
      }
    #39247
    Nicole
    Participant

    Hi!
    Do you guys have a code that allows new users signing up to automatic have a level 1 membership?

    #39249
    Anna
    Member

    Nicole,
    “level 1” would be the first level you set up in your membership levels with paid memberships pro.
    I am not sure exactly how, but if you work with that plugin I think there is a way to set it so that new registered users are given a level at sign-up. they have a lot of tutorials and information on their plugin website PMPRO

    #43465
    Reem Safdar
    Participant

    Hi Anna,

    I used your code for changing roles and its working wonders.

    I am trying to get different commission on the three paidmemberships pro memberships I’ve.

    Basic
    15% Commission

    Premium
    10% Commission

    Gold Premium
    3.3% Commission

    Do you know how to do that?

    I’d really appreciate your help on this.. I’m not good at php myself..

    Best Regards,
    Reem Safdar
    [email protected]

    #47226
    Robert
    Participant

    Hey everyone if you don’t want to try and write code, to upgrade and downgrade people from vendor status, just use Role-O-Matic

    Its working great for me.

    Also, I coded the WC Vendors Stripe Connect to work with Subscription based products. If you need a copy of that code let me know.

    I use:
    woocommerce Subscriptions
    Woocommerce Memberships
    WC Vendors
    and WC Vendor Stripe Connect (my altered Version)

    And with these 4 plugins, i can do everything. Auto-upgrade or down-grade Users, limit how many products a vendor can publish, collect membership fees or whatever else you could want.

    Always, if anyone still needs help, just message me. I am not WC Vendor Support, or work for them. I just was reading the problems and so i created some solutions.

    #47921
    Ol’ Boy
    Participant

    @madhatmedia

    Hi Robert,

    I’m very interested in your customization for subscriptions / Stripe Connect.

    Anyway you could help me out?

    #48664
    Bex
    Participant

    Sorry I’m quite confused.

    I have Paid Membership Pro. But where do I put the application page? How do I add it to my Vendor Application page?

    #48824
    Anna
    Member

    @AViolentDelight
    You wouldn’t.
    Essentially you would:
    1. have a user register to your site.
    2. have a page in which you direct registered users to if they wish to apply to become a vendor- have the Paid membership Pro buttons on that page so they click on them and pay before applying to become a vendor
    3. redirect the user after payment to the WC Vendors Apply to Become a Vendor application by directing them to the pro vendor dashboard page after payment.

    Or- if you wish for them to apply to become a vendor first and wait for approval:
    1. have them go to the /my-account/ page to register and check the check box to apply to become a vendor
    2. Review the application
    3. If you approve them, send them an email with a link to the Paid Memberships Pro page/buttons
    4. after payment, they receive the vendor role if you have used code similar to what I have given above.

    It takes a bit of work and configuration, but it is quite do-able to have either of these scenarios. You can use a page restricting plugin to restrict the pro vendor dashboard page to anyone who does not yet have the vendor role, if needed.

    #50705
    Hawkins
    Participant

    Hello @madhatmedia
    I’m interested in using the 4 sets of plugins
    woocommerce Subscriptions
    Woocommerce Memberships
    WC Vendors
    and WC Vendor Stripe Connect (my altered Version )

    AND ‘ll need your help/services if you have some times. Please, let me know how to reach you or contact me when you have a moment at [email protected]

    If anyone else has a better and simpler solutions since the above posting, please, do let me know.

    #50774
    Anna
    Member

    @orjense
    It depends on what you are trying to achieve.
    Are you trying to make a membership site? So that users pay you monthly, for example, to be a vendor?

    What did you alter in Stripe Connect? o.O

    #50804
    Hawkins
    Participant

    Hi Anna,
    Thanks for responding to me.
    YES! I’m trying to make a membership site for this particular installation. I’m using Social Marketplace Theme and the plan is to have 3 types of Membership packages which includes two types of Vendor Memberships.
    1) Subscriber Membership for Buyers,
    2) Vendor 1 – Free Membership Vendors ( Accept Payment through Credit, Debit and Paypal Only
    3) Vendor 2 Premium Paid (Monthly) Membership Vendors. (The premium (Paid) member Product listings will be “Featured”. They will also have access to get payment through Credit /debit Cards,Paypal and DIRECT BANK DEPOSIT payment.

    Also, the plan is to use PayPal Powered by Braintree for WooCommerce plugin for payment instead of stripe. The reason is, this plugin gives both Credit/Debit Card and Paypal payment capabilities also take advantage of woocoommerce direct Bank Deposit – which is popular in the targeted Market.

    Thanks again,
    Hawkins

    #51312
    Hawkins
    Participant

    Hi Anna,
    Please, when you have a moment let me know if you could help.

    Thanks
    Hawkins

    #51313
    Hawkins
    Participant

    Could be reached at [email protected]

    #51483
    Hawkins
    Participant

    Hello Anna,
    Any additional information or guidance regarding the request shown below will be highly appreciated.

    YES! I’m trying to make a membership site for this particular installation. I’m using Social Marketplace Theme and the plan is to have 3 types of Membership packages which includes two types of Vendor Memberships.
    1) Subscriber Membership for Buyers,
    2) Vendor 1 – Free Membership Vendors ( Accept Payment through Credit, Debit and Paypal Only
    3) Vendor 2 Premium Paid (Monthly) Membership Vendors. (The premium (Paid) member Product listings will be “Featured”. They will also have access to get payment through Credit /debit Cards,Paypal and DIRECT BANK DEPOSIT payment.

    Also, the plan is to use PayPal Powered by Braintree for WooCommerce plugin for payment instead of stripe. The reason is, this plugin gives both Credit/Debit Card and Paypal payment capabilities also take advantage of woocoommerce direct Bank Deposit – which is popular in the targeted Market.

    Thanks again,
    [email protected]

    #51654
    Anna
    Member

    Hello,
    You can certainly set-up the paid membership levels using PMPRO. However, I am not quite sure how you would achieve:

    3) (The premium (Paid) member Product listings will be “Featured”. They will also have access to get payment through Credit /debit Cards,Paypal and DIRECT BANK DEPOSIT payment.

    Something that I know is likely possible with custom code work, but I do not how precisely what you’d need to code up to restrict the level 1 vendors from receiving commission, or rather how to provide those payment methods only for the level 2 vendors.

    Braintree at this time is not integrated to allow you to submit your vendors’ commission at checkout, but you can pay your vendors their commission however you wish.

    #66635
    Thomas Thai
    Participant

    @MADHATMEDIA, you’ve offered to share your code modifications in a few postings. Would you post it here? In addition to the WC Vendors Stripe modification, how did you get Subscription (simple and variable) to show in the Products Data drop down menu?

    #67460
    Bola Gadalla
    Participant

    @FERVOUS @Anna
    Hello
    have you found a solution to hide the products from unsubscribed vendors and then make it visible again once they subscribe to be a vendor again?
    i have been looking so hard for a solution but didnt find anything so far. please help me and if you found or made a code that i could put on my theme function file can you please share it that will be great help for me and others who are also looking for it. Thanks a lot for your time.

    #67466
    Bola Gadalla
    Participant

    @MTGAME21

    Hello
    Have you found any solution yet? to change the products of a vendor who unsubscribed to hidden until he subscribes again.

    Please if you have found anything can you please post it here because i have been looking for a way to do this for days.

    I also used the Code my Anna @fervous and plugins are Woocommerce, wc vendor, Paid Membership Pro and buddypress.

    if anything please help me out here and also the next guy after me who might also need help. i know this post been around for like a year but i just started out and i really need all the help and support i could get.

    Thank You.

    #77622
    James1231
    Participant

    @FERVOUS

    Did anyone manage to integrate a automatic commission change using Paid Memberships Pro and the wcv_commission_rate filter?

    I’ve created two membership levels using Paid Memberships Pro.

    (1) FREE MEMBERSHIP – Uses default WC Vendor commission settings – Fixed $1.95 fee

    (2) PAID MEMBERSHIP – Requires custom commission rate (example: change fixed fee to $0.00) , ideally changed when user becomes a paid member.

    Thanks

Viewing 46 posts - 1 through 46 (of 46 total)
  • The forum ‘Plugin or Theme Compatibility’ is closed to new topics and replies.