Integration with WC vendors plugin.

 

In this tutorial we’ll integrate WC Vendors plugins with WPLMS.

Environment :

Component : Version

WPLMS : 2.0.9.3

WooCommerce : 2.5.5

WC Vendors : 1.9.0


 

Please follow these steps:

  1. Installation :
    • Go to wp-admin->plugins->add new.
    • Now search for wc vendors plugin.
    • Click on install Now
    • Activate the plugin.

    refer: 

  2. Adding code in customizer plugin:
    • Now go to wp-admin->plugins->editor.
    • Now select wplms customizer plugin.
    • Now add the below code in the wplms-customizer.php file before “?>”.

    refer: 

  3. Here is the code:
    add_action('init','add_instructor_properties_to_vendors',1);
    function add_instructor_properties_to_vendors(){
      $caps = array ('delete_posts','delete_published_posts','edit_posts','manage_categories','edit_published_posts','publish_posts','read','upload_files','unfiltered_html','level_1');
      $role = get_role( 'vendor' );
      foreach ( $caps as $cap ){
        $role->add_cap( $cap );
      }
    }
    
  4. Now any user can go to vendor dashboard page and can apply for becoming a vendor, refer: 
  5. Approving the vendors:
    • Now admin can go to wp-admin->users.
    • Click on pending vendor.
    • Now approve the vendors individually or select all and bulk approve vendors.

    refer: 

  6. Now vendors can create their own courses and products which will appear in the shop page and vendors will get commission for it.
  7. For setting commission go to wp-admin->woocommerce->wc vendors->general and set the commission, refer: 

Was this article helpful?

Related Articles

Leave A Comment?