• Resolved jusemora30

    (@jusemora30)


    Hello!

    Each time I receive a payment through paypal, I get this log on the debug.log file:

    [01-Aug-2025 15:19:06 UTC] PHP Warning: Trying to access array offset on null in /public_html/wp-content/plugins/express-checkout-paypal-payment-gateway-for-woocommerce/includes/class-paypal-express-api.php on line 2442

    • This topic was modified 9 months, 4 weeks ago by jusemora30.

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

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

    (@webtoffeesupport)

    Hi @jusemora30,

    Thank you for reporting this and sharing the warning message.

    To help us narrow down the cause, could you please:

    1. Confirm whether this warning appears on every PayPal transaction or intermittently.
    2. Share your site’s System Status Report (WooCommerce > Status > Get system report).
    3. If possible, let us know if any customizations have been made to the PayPal checkout flow or related plugins.

    You can securely share these details via this link.

    Thread Starter jusemora30

    (@jusemora30)

    Thank you for your response. Here are the details you requested:

    1. Frequency: The warning appears consistently on every PayPal transaction initiated via the Express Checkout smart button. It doesn’t seem to happen if the customer fills out the standard checkout form first.
    2. System Status Report: It’s all good there, nothing flagged in red.
    3. Customizations: I use a Funnel Builder plugin which customizes the checkout pages.

    I got help to debugging this issue with AI and this is the result:

    Analysis:
    I have confirmed that the warning on line 2442 is caused by trying to access $post_data[‘billing_phone’] when $post_data is null.

    The issue is fully resolved by applying a null coalescing operator.

    Original Code (Line 2442):
    ? $post_data[‘billing_phone’] : …

    Proposed Fix:
    ? ($post_data[‘billing_phone’] ?? ”) : …

    Applying this change locally has permanently fixed the error. I hope this helps you address the issue in a future update.

    Thank you!

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @jusemora30,

    Thank you for sharing the detailed analysis and proposed fix — that’s very helpful.

    We’ve modified our plugin to address this issue and will be including the change in the next release. Your input has helped us improve the stability of the PayPal integration, and we appreciate you taking the time to investigate and share your findings.

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

The topic ‘Log generated for all purchases’ is closed to new replies.