• !URGENT!
    I have searched everywhere but I did not find any solution for my issue(not an issue).
    I want to add multiple stripe account on one woo-commerce installation.
    My e-commerce website has 4 categories for products. I want to use a different stripe account for the first 3 categories’s products and another stripe account for the last 4th category.Meanwhile, I found an article https://www.neshable.com/how-to-use-multiple-stripe-accounts-in-one-woocommerce-install/ But did not understand what i do with code.
    So please can anyone tell us how to get that multistripe account function on website using woocommerce filter hooks.we need a step by step guide including Rough publishable and secret keys in the code so that we can replace keys with own keys.
    hope I will get an answer soon.
    The answer will be highly appreciated and many many thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ramichoudhary,

    Your question is very in depth and requires some custom code, which is beyond the scope of this support thread. I can show you where to find what you need and give a rough example but I am not going to code it for you.

    Steps:

    1. The API Settings class contains a hook that will allow you to save the API keys for an account in a custom format. https://docs.paymentplugins.com/wc-stripe/api/source-class-WC_Stripe_API_Settings.html#126-173
    2. Write a custom function that hooks in to that action and saves the API keys somewhere.

    add_action('wc_stripe_connect_settings', function($response, $settings){
        $custom_settings = array(
            'account_id' => $response->$response->live->stripe_user_id,
            'secret_key_live' => $response->live->access_token,
            'publishable_key_live' => $response->live->stripe_publishable_key
        );
        // save your settings to the option table (use whatever name you want)
        update_option("stripe_account_${$custom_settings['account_id']}_options", $custom_settings);
    }, 10, 2);

    Now, every time you connect a new account, it will be saved in the options table in your custom format. You can then reference that option value in your own custom code to perform whatever logic you want.

    Kind Regards,

    Thread Starter ramichoudhary

    (@ramichoudhary)

    Thanks a lot for your answer.
    But to be honest, I still did not achieve what I want. hope you understand my requirements well. Is there any source, video, documentation which shows a step by step guide OR can we contact personally(if possible). Please Let me know.
    Many thanks.

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ramichoudhary,

    Hooks and filters exist within WordPress to allow developers to extend plug in functionality beyond what it can do out of the box. My stripe plug-in is no exception, it provides all of the necessary hooks and filters for you to achieve the custom functionality that you are seeking.

    I provided a link to the entire plug-ins API documentation in my previous reply which I highly encourage you to take a look at as it will assist you in your development.

    Feel free to reach out via the Help button on the settings pages.

    Kind regards,

    Thread Starter ramichoudhary

    (@ramichoudhary)

    Hello @mrclayton
    You are really a great person because the way you are helping us is incredible and quick.
    Its been 5 days I am searching for this topic and to be honest still I am unable to put code on the site.
    So my last request is this that can you please write the whole code for this function.
    Your work will not only help me but many web developers who are searching for a long time.
    It will be the biggest help on this platform.
    Hope you will accept our request.
    Many Many thanks.

    Hello ramichoudhary,
    I’m wondering if you’ve found a solution to your probleme ? I have the same request !
    2 categories of products on my woocommerce website to be dispatch on 2 differents stripe accounts according to the categories.
    Is it possible using hook & filters ?
    Thank you
    Rudy

    Thread Starter ramichoudhary

    (@ramichoudhary)

    Hello @100fahrenheit
    Of course, it’s possible to change the stripe account during checkout using woocommerce hooks and filters.
    Please visit this if you are techy in coding
    https://www.neshable.com/how-to-use-multiple-stripe-accounts-in-one-woocommerce-install/

    Thankyou!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘2 stripe account on one woocommerce plugin’ is closed to new replies.