• Resolved leogrape

    (@leogrape)


    Hello,

    We are using a Paypal subscription button on 4 product pages.
    This worked fine with the old “WooCommerce PayPal Checkout Gateway” plugin.
    With the new plugin ”
    WooCommerce PayPal Payments” the buttons gets hidden after one second, leaving the customer no chance to purchase over the button!

    Integration is done via this code:

    <div id="paypal-button-container-P-3...XXXXXX"></div>
    <script src="https://www.paypal.com/sdk/js?client-id=A...XXXXXX1&vault=true&intent=subscription" data-sdk-integration-source="button-factory"></script>
    <script>
      paypal.Buttons({
          style: {
              shape: 'rect',
              color: 'white',
              layout: 'vertical',
              label: 'subscribe'
          },
          createSubscription: function(data, actions) {
            return actions.subscription.create({
              /* Creates the subscription */
              plan_id: 'P-3...XXXXXX'
            });
          },
          onApprove: function(data, actions) {
            alert(data.subscriptionID); // You can add optional success message for the subscriber here
          }
      }).render('#paypal-button-container-P-3...XXXXXX'); // Renders the PayPal button
    </script>

    With the Paypal plgin in deactivated the button works as expected.
    What can we do to fix this?

    Urgent help needed. thanks !

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @leogrape,

    Using multiple PayPal integrations at the same time is not recommended or supported.
    If you separate on which pages the scripts are loaded, then it may be possible to avoid eventual conflicts, but it’s not something we would recommend doing either way.
    So when integrating a custom PayPal subscription button on certain single product pages, the PayPal Payments smart buttons on the single product page and the mini cart would need to be disabled at the very least.
    Otherwise, the scripts may conflict with one another which could cause both of them to stop working properly.

    Kind regards,
    Niklas

    Thread Starter leogrape

    (@leogrape)

    Hi Niklas,

    It was working fine with the previous plugin. We need the Button integration to implement a subscription on those 4 products only. We implement the buttons via the code provided so not an additional plugin.

    We dont use paypal payments smart buttons. So you say if we deactivate the mini cart function of the plugin it should work as expected?

    Best
    Leo

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @leogrape,

    I can’t say whether or not it would work as expected, but it would be worth giving it a try in any case. PayPal Payments and the PayPal Checkout plugin may not react the same way to scenarios with conflicting scripts.

    PayPal Payments only loads the PayPal scripts on pages where the smart buttons are active. When the mini cart button is enabled, then the scripts load on almost all pages of the site, which could potentially impact other button integrations on the single product page. When no scripts are loaded, then it should behave the same as if the plugin wasn’t even there.

    Anyway, PayPal Payments implements Vaulting and supports the official WooCommerce Subscriptions plugin for recurring payments. This approach would be the official recommendation for setups with recurring payments, though this requires Reference Transactions to be enabled, unlike the button you implemented yourself.

    Kind regards,
    Niklas

    Thread Starter leogrape

    (@leogrape)

    Thanks Niklas,
    That worked, however this is not really prefered but a temp fix.
    the Woo Subscriptions plugin is a bit to pricey for us, we dont sell many subsriptions so its not worth it. You mean the paied pligín right?

    best
    Leo

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @leogrape,

    Thanks for the feedback.
    Yes, I’m talking about the official Subscriptions plugin. We are also looking into eventually implementing the new PayPal Subscriptions API as a fallback solution but that will take some more time.

    I’m not sure there is anything else we could do to make these scripts compatible beyond ensuring only one of them is loaded at a time. But we’ll bring this up with our developers and partners at PayPal.

    Kind regards,
    Niklas

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    It has been quite some time since our last communication, so we will mark this thread as resolved. Please open a new thread if you are still facing issues or have questions that you need us to answer.

    Kind regards,
    Joost

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘URGENT: Paypal button integration does not show woth plugin activated’ is closed to new replies.