• Resolved ucarmetin

    (@ucarmetin)


    Hi

    We have a special setup where we are forced to use both this and WooCommerce Stripe Gateway plugin together. The latest version of both plugins are used on the latest version of WordPress and WooCommerce. Each plugin is configured to work with a separate Stripe account. The separate webhooks are configured for each plugin.

    Payment Plugins for Stripe WooCommerce is used when user’s billing country is USA and WooCommerce Stripe Gateway is used when user’s country is NOT USA.

    Both plugin work together fine when it comes to payments and the payments are sent to the correct Stripe account but we’ve noticed a few issues:

    1. The reference for all payments is Payment Plugins for Stripe WooCommerce even when a payment is processed through WooCommerce Stripe Gateway
    2. Charge ID and Payment Intent ID are wrong. So when a payment is processed by this plugin, the Charge ID and Payment Intent ID generated do not lead to the correct Stripe account. The same issue occurs for the payment processed by the other plugin.
    3. Refunding via Payment Plugins for Stripe WooCommerce works but it’s not possible to refund via WooCommerce Stripe Gateway and we’re forced to use manual refund.

    So, both plugins can work together but there are some conflicts. I believe that the reason that some things work via this plugin while not the other one is that the other plugin is higher in the list of payments found under WooCommerce > Settings > Payments but I’m not 100%.

    It’d be great to get plugin team’s feedback on how we can avoid such conflicts and make sure both plugins work in given constraints.

    Thank you

    • This topic was modified 1 year ago by ucarmetin.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ucarmetin

    What you’re describing is occurring because our Stripe plugin allows for a seamless migration when switching over to our plugin from another Stripe plugin. You will need to add a code snippet to your site that removes this default migration behavior.

    Example:

    remove_filter( 'woocommerce_order_get_payment_method', array('WC_Stripe_Gateway_Conversion', 'convert_payment_method' ), 10 );
    remove_filter( 'woocommerce_subscription_get_payment_method', array('WC_Stripe_Gateway_Conversion', 'convert_payment_method' ), 10 );

    This will prevent our plugin from overriding any data that pertains to the WooCommerce Stripe Gateway plugin.

    Kind Regards

    Thread Starter ucarmetin

    (@ucarmetin)

    Hi @mrclayton,

    Thank you for the quick response.

    I’ve added both filters but still I’m getting the wrong name and when I try to refund the order, it says no such charge. I’m using different names for Stripe integrations while testing.

    Here’s an example. The payment is processed by the other Stripe plugin. The Charge ID is correct but it says it’s processed by Payment Plugins for Stripe WooCommerce. When trying to refund this order, I think it tries to refund through your plugin instead of the other plugin and that’s why fails.

    p.s. I’m using custom names to differentiate between Stripe plugins. That’s why it says “Credit Card (Stripe) (Inc)”.

    • This reply was modified 1 year ago by ucarmetin.
    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ucarmetin

    You need to wrap the example code in the init or woocommerce_init function to ensure the filters get removed after they have been added.

    Example:

    add_action('woocommerce_init', function(){
        remove_filter( 'woocommerce_order_get_payment_method', array('WC_Stripe_Gateway_Conversion', 'convert_payment_method' ), 10 );
        remove_filter( 'woocommerce_subscription_get_payment_method', array('WC_Stripe_Gateway_Conversion', 'convert_payment_method' ), 10 );
    }, 50);
    Thread Starter ucarmetin

    (@ucarmetin)

    Yeah, that worked just fine.

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Conflict with WooCommerce Stripe Gateway’ is closed to new replies.