1. Home
  2. Knowledge Base
  3. WC Vendors
  4. Paid Memberships Pro with WC Vendors
  1. Home
  2. Knowledge Base
  3. Third Party Integrations
  4. Paid Memberships Pro with WC Vendors

Paid Memberships Pro with WC Vendors

The following article will outline a snippet that will get Paid Memberships Pro with WC Vendors working. The challenge with setting up a membership plugin is getting the plugin to automatically upgrade a subscriber to the 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 WordPress role or a role that the membership plugin defines.

Steps

  • Install and configure the Paid Memberships Pro plugin, the free version will work for this.
  • Set up your membership level or levels.
  • Add the below 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. You will have to get the level numbers and roles to match the configuration of your site. You can have this switch to different roles other than the vendor, whatever the roles are on your site that you wish to have assigned to a paid membership. In this case. In the example below, we have monthly and yearly membership-level choices.

This code is to be placed in your child theme functions.php.

Info

If you are looking for a membership plugin we have created our own membership plugin. WC Vendors Membership which uses WooCommerce Subscriptions to create a membership based marketplace.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Complete Your Purchase