Require Vendors To Have Stripe?

This topic contains 8 replies, has 3 voices, and was last updated by Profile photo of Anna Anna 1 month, 1 week ago.

  • Author
    Posts
  • #49537 Score: 0
    Profile photo of Chris Chris 
    6 pts
    @christopherclark

    Sorry if this has been addressed… I’m on my phone and was having trouble searching.

    Is there a way to require Vendors to have a Stripe account? From what I read, a vendor having Stripe + use of the WCVendor Stripe Plugin pretty much automates everything.

    Is there a way to require this? Otherwise… it looks like all of the payment goes to the Marketplace owner (no?).

    Thank you!!!

    Chris

    #49648 Score: 3
    Profile photo of Anna Anna 
    WC Vendors Official Support
    178 pts
    @fervous

    Chris,
    I have a way in which you can prevent vendors from being able to list a product unless they have connected a Stripe account in their pro dashboard > settings > payments.
    It shows a message that tells them to connect to Stripe, and a link to the dashboard settings.

    In order to use this, you’ll need to modify the product-edit.php template.
    move this template: wp-content/plugins/wcvendors-pro/templates/dashboard/product-edit.php to your theme or child theme.
    I think you’re using OneSocial???
    If so, for onesocial you would move it to: wp-content/themes/onesocial-child/bb-marketplace/wc-vendors/dashboard/product-edit.php
    If not, then: wp-content/themes/your-theme-or-child-theme/wc-vendors/dashboard/product-edit.php

    You can replace the entire file with this, or add the parts I have added, as I’ll explain below what’s been modified so you can add the modification again to the template the future if we have to update the product-edit.php:

    First change:
    lines 24-28, I added this, which checks for the Stripe token of the vendor. If the token exists, then no worries- it shows the product add/edit page:

    $access_token = get_user_meta( get_current_user_id(), '_stripe_connect_access_key', true );
    if ( !empty( $access_token ) ) {
    ?>

    Second change:
    After , I added this, which shows this message and blocks the product page from showing if the Stripe token is not found:

    <?php
    } else {
    echo '  <p><strong>WAIT!</strong>   Before you can add products, you must connect to STRIPE, so you can receive the funds from your sales.  To connect to Stripe, <a href="/pro_dashboard/settings/"><strong>VISIT YOUR STORE DASHBOARD SETTINGS</strong></a> and click the <strong>PAYMENTS</strong> tab.</p>';
    }
    ?>

    I use this on my own site- works great.

    Profile photo of ChrisProfile photo of David RProfile photo of Karen
    #49650 Score: 0
    Profile photo of Chris Chris 
    6 pts
    @christopherclark

    Anna, this is amazing – THANK YOU! Did you code this yourself? Very cool!

    #49747 Score: 0
    Profile photo of Chris Chris 
    6 pts
    @christopherclark

    Ahhhhh, I can’t get it to work for me. It seems to always think that the vendor has a stripe key. ๐Ÿ™

    #49753 Score: 0
    Profile photo of Anna Anna 
    WC Vendors Official Support
    178 pts
    @fervous

    Chris,
    Weird, as I use this on my site and I just checked and it is working/
    Do you have the OneSocial theme?
    If so, make sure the product-edit.php file has been moved to your child theme with the following path:
    wp-content/themes/onesocial-child/bb-marketplace/wc-vendors/dashboard/product-edit.php

    Also- yeah, I wrote it, though I believe I worked this out with Ben’s help as I had trouble at first – it was before I worked here ๐Ÿ˜€ and I was still building my marketplace.

    #49754 Score: 0
    Profile photo of Anna Anna 
    WC Vendors Official Support
    178 pts
    @fervous

    When I gave you the file path yesterday I forgot to add the bb-marketplace to the path for the OneSocial theme– make sure you add that in and this should work.

    Sorry!

    #49790 Score: 1
    Profile photo of Chris Chris 
    6 pts
    @christopherclark

    That was it! ๐Ÿ™‚ Thank you again!

    Profile photo of ben
    #55927 Score: 0
    Profile photo of ben ben 
    WC Vendors Official Support
    289 pts
    @ben

    @fervous toss that in a kb article =)

    #55947 Score: 0
    Profile photo of Anna Anna 
    WC Vendors Official Support
    178 pts
    @fervous
Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

ยฉ2009-2017 WC Vendors ยท Terms of Service, Support, and Refund Policies

Log in with your credentials

or    

Forgot your details?

Create Account