• Resolved cproetti

    (@cproetti)


    We recently upgraded to this official WooCommerce PayPal Payments plugin and are now having an issue where the PayPal branded button is completely missing. The expected behaviour (though undesired) is that it removes the default checkout button and inserts its own PayPal branded button.

    Our site has a very simple multi-warehousing setup by defining the shipping zones that each warehouse services and then using a WooCommerce filter to remove payment methods according to the customers billing country. This works fine with all other payment plugins we’ve used.

    We use PayPal integration for customers paying in countries which the Australian warehouse should receive the payment. We use Stripe integration for customers paying in countries which the Singapore warehouse should receive the payment. This is a very simple way to leverage a WooCommerce filter to avoid the complex of a full-fledged multi-warehousing plugins.

    The issue with the missing PayPal button can be reproduced with just the Stripe, PayPal, and WooCommerce plugins; plus our little bit of code for filtering the payment methods.

    I have recorded a video of this bug in a test environment and explained our utilisation of the woocommerce_available_payment_gateways filter.

    Video demo of the bug: https://youtu.be/_wROTGjoE7s

    When inspecting the HTML, I noticed that the PayPal branded button is inserted after the <div#payment> container and this might be the problem since it relies on HTML insertion at the time the page load, not dynamically refreshed when the customer changes their address or other info.

    The PayPal Payments plugin currently uses WooCommerce server-side hooks and filters that are intended for static page load scenarios but only inserting the static content on the basis of dynamically refreshed content (the payments). This approach fails to accommodate hooks which are used in WooCommerce elements that are also dynamically used based on user interactions handled via WP AJAX.

    It is the plugins responsibility to know-of and considered appropriate use of hooks which are designed to for content that is being loaded initially or refreshed dynamically via AJAX, especially on the checkout where many hooks are used for both static and dynamic content. You must ensure the utilisation is appropriate where your static is dependent or relies on the dynamic content. This plugin employs static-load hooks in scenarios that require dynamic content updates, leading to missing elements and unmet dependencies. This discrepancy in hook utilisation is not just a bug but a fundamental design flaw that undermines the plugin’s interoperability and leads to integration errors.

    The PayPal Payments plugin should respect the principals of integration set by WooCommerce and WordPress.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @cproetti

    The problem you’re experiencing is indeed similar to what has been described in this support thread, as well as in issue #1337 on GitHub. Unfortunately, we have not yet been able to fully address this behavior, but it is something that will be improved in the future.

    At the moment, your specific use case, where the PayPal gateway is unset during the page load, is not supported. As a result, the PayPal buttons will not load properly. Your alternatives for now would be either not hiding the PayPal gateway on page load or disabling the PayPal smart buttons in favor of the “Proceed to PayPal” button. You can do this using the following filter:
    Disable Checkout Smart Buttons.

    We apologize for the inconvenience and hope this workaround helps until a more permanent solution is available.

    Kind Regards,

    Krystian

    1formanet

    (@1formanet)

    I have the same issue … For a classic use : “classic checkout page” button is not showing except if I add Express checkout

    • This reply was modified 2 months ago by 1formanet.
    • This reply was modified 2 months ago by 1formanet.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.