• Hi PayPal Payments team,

    We’ve found a reproducible conflict between WooCommerce PayPal Payments and the Latitude Interest Free Gateway for WooCommerce plugin (also listed as “Latitude Payment App Gateway for WooCommerce”). When both are active, every admin screen that uses the block editor loads as a blank white page.

    ENVIRONMENT

    • WordPress: [version]
    • WooCommerce: 11.2.1
    • WooCommerce PayPal Payments: reproduced on 4.1.3, 4.2.0 and 4.2.2
    • Latitude Interest Free Gateway for WooCommerce: 2.0.2 (latest)
    • PHP 8.2, 256M memory limit, Kinsta hosting
    • Theme: Porto (child); also reproduced with Twenty Twenty-Five in Health Check troubleshooting mode

    AFFECTED SCREENS (all return a blank page)

    • Pages / Posts > Add New, and editing existing pages and posts
    • Any custom post type that uses the block editor (e.g. Porto Builder, FAQs)
    • Appearance > Customize
    • Appearance > Widgets
    • Site Editor
    • Reusable blocks / patterns

    Not affected: product, order and coupon screens, WooCommerce settings, the Elementor editor, and the storefront and checkout. Both payment methods keep working at checkout.

    SYMPTOM
    The server returns HTTP 200 with a completely empty body (0 bytes). With WP_DEBUG and WP_DEBUG_LOG enabled, no fatal error, memory error or warning is logged for these requests, and the host’s PHP error log shows nothing either. So it looks like execution is being stopped silently (exit/die, or an output buffer being discarded) rather than a crash.

    HOW WE ISOLATED IT (staging, Health Check troubleshooting mode)

    1. All plugins disabled: the editor loads.
    2. WooCommerce + PayPal Payments only: the editor loads.
    3. Re-enabled our other plugins one by one: the editor still loads.
    4. Enabled Latitude Interest Free Gateway as well: blank page.
    5. With the same set active, disabling only PayPal Payments OR only Latitude makes the editor load again.

    So the blank screen only happens when PayPal Payments and Latitude are active together. Neither causes it on its own.

    TEMPORARY WORKAROUND
    We added a small must-use plugin that filters option_active_plugins so Latitude isn’t loaded on post.php / post-new.php (non-WooCommerce post types), customize.php, widgets.php and site-editor.php. With that in place every affected screen loads normally and both gateways still work at checkout. That confirms the conflict happens while these screens are being rendered.

    QUESTIONS

    1. Is this a known conflict? Is a fix planned?
    2. Is there a PayPal Payments setting or filter we could use to stop the code that conflicts from running on block editor screens, so we can remove our workaround?
    3. Is there anything you’d like us to capture (e.g. a specific debug setting or trace) to help pin down where execution stops?

    We can share the WooCommerce System Status Report privately if needed. We’re reporting this to Latitude as well.

    Thanks for your help!

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

    (@inpsydekrystian)

    Hi @tharindusenarathne ,

    We reproduced the conflict on our test site. Here is what happens. On block editor screens, WooCommerce loads data for the checkout payment methods so blocks like the Mini-Cart can be shown in the editor. As part of that, PayPal Payments’ Pay upon Invoice integration applies the standard WooCommerce filter woocommerce_order_button_text. Latitude hooks into that filter and reads the shopper’s cart session (WC()->session), but admin screens have no session. PHP stops with a fatal error (Call to a member function get() on null in Latitude’s wc-latitudecheckout-gateway.php). Your host returns that as an empty page.

    To your questions:

    1. It wasn’t known before your report. We’ve logged it, and we’ll change PayPal Payments so it doesn’t run this checkout code on editor screens. I can’t give a release date yet. It would also be worth passing the details above to Latitude, because their callback should check that the session exists first.
    2. There is no PayPal Payments setting for this. Instead of your mu-plugin, you can use the snippet below, which is more targeted. It skips only Latitude’s button-text callback when there is no cart session, such as on admin screens, so Latitude still changes the button to “Choose a plan” at checkout. Add it with a code snippets plugin (such as Code Snippets) or to your child theme’s functions.php file:
    add_filter( 'woocommerce_order_button_text', function ( $text ) {
    	if ( function_exists( 'WC' ) && WC()->session ) {
    		return $text;
    	}
    	if ( class_exists( 'WC_Latitude_Checkout_Gateway' ) ) {
    		remove_filter( 'woocommerce_order_button_text', array( WC_Latitude_Checkout_Gateway::get_instance(), 'filter_place_order_button_text' ), 10 );
    	}
    	return $text;
    }, 9 );
    
    1. Nothing else is needed for now. We confirmed the cause with a backtrace on our side.

    Please back up your site before adding custom code. Afterwards, check that the block editor loads, then place a test order with both PayPal and Latitude to make sure everything works as expected. Once the snippet is in place, you can remove the option_active_plugins mu-plugin.

    Kind Regards
    Krystian

    Thread Starter Tharindu Senarathne

    (@tharindusenarathne)

    Hi Krystian,

    Thank you for the quick and thorough investigation, and for the clear explanation of the cause.

    We’ve applied your snippet, first on staging and then on the live site, and removed our option_active_plugins mu-plugin. Everything is working again:

    • Pages and posts (Add New and Edit), custom post types, Customize, Widgets and the Site Editor all load normally.
    • Product, order and WooCommerce settings screens are unaffected.
    • At checkout both PayPal and Latitude are still offered, and Latitude still changes the button to “Choose a plan”.

    We’ll pass your findings on to the Latitude team, since their filter_place_order_button_text callback should check that WC()->session exists before using it.

    We’ll keep the snippet in place until the PayPal Payments change (or a Latitude fix) is released. Could you post an update in this thread when the change ships, so we know when it’s safe to remove it?

    Thanks again for your help!

    Kind regards,
    Tharindu

    Plugin Support Krystian Syde

    (@inpsydekrystian)

    Hi @tharindusenarathne ,

    I’m glad to hear that everything is working.

    I’ve already reported the issue to our development team, and we’ll let you know in this thread once a fix has been released.

    If this helped and you’re happy with the support, feel free to leave a quick review on WordPress. It means a lot to us and shows that we are needed as support.

    Kind Regards,
    Krystian

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.