• Resolved Hahotii

    (@oussamazribi)


    Hello,

    I successfully onboarded my maketplace sellers through the stripe connect onbording process but after the onboarding is finished they are redirected to their WCFM dashboard as indicated here (https://docs.wclovers.com/vendor-payment/).

    I want them to get access to their Stripe dashboard but there is any link or button for that. When they try to login to stripe with their WCFM credentials, they receive a message with “Email not found”.

    I contacted Stripe connect customer support for that, they asked me to read this https://stripe.com/docs/connect/express-dashboard and this https://stripe.com/docs/api/account/create_login_link .

    Given that I have no code skills, I want to know if I should follow these steps in the context of WCFM ? And if yes, how can that be done ?

    Thanks,

    • This topic was modified 4 years, 1 month ago by Hahotii.
Viewing 1 replies (of 1 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Add this snippet to your site –

    use Stripe\Stripe as Stripe;
    use Stripe\Account as Stripe_Account;
    add_action('wcfm_vendor_end_settings_payment', function($user_id) {
        $user_settings = get_user_meta( $user_id, 'wcfmmp_profile_settings', true );
        $vendor_connected = get_user_meta( $user_id, 'vendor_connected', true );
        $stripe_user_id = get_user_meta($user_id, 'stripe_user_id', true);
        if ( isset( $user_settings['payment']['method'] ) && $user_settings['payment']['method'] === 'stripe' && $vendor_connected == 1 && $stripe_user_id && apply_filters( 'wcfm_is_allow_stripe_express_api', true ) ) {
            try {
                $login_temp_link = Stripe_Account::createLoginLink( $stripe_user_id );
                if ( $login_temp_link->url ) {
                    echo '<a href="' . $login_temp_link->url . '" target="_blank">Go to account</a>';
                }
            } catch ( Exception $e ) {
                echo "Failed to generate Stripe account link";
            }
        }
    });

    add those using this plugin –?https://www.ads-software.com/plugins/code-snippets/

Viewing 1 replies (of 1 total)
  • The topic ‘Stripe Connect login for connected accounts’ is closed to new replies.