PayPal related ERROR LOG

Since december I noticed these errors in the log file:

[06-Dec-2025 10:16:36 UTC] PHP Warning: Undefined array key 1 in /wp-content/plugins/s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php on line 70

[10-Dec-2025 20:15:29 UTC] PHP Warning: Undefined array key 1 in /wp-content/plugins/s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php on line 63

[12-Dec-2025 09:45:00 UTC] PHP Warning: Undefined array key “payment_status” in /wp-content/plugins/s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php on line 65

[12-Dec-2025 09:45:00 UTC] PHP Warning: Undefined array key “payment_status” in /wp-content/plugins/s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php on line 66

[12-Dec-2025 09:45:00 UTC] PHP Warning: Undefined array key “mc_currency” in /wp-content/plugins/s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php on line 87

Paypal was used many years ago, now it’s only stripe. I deleted all the info the paypal section, just in case but the errors keep coming.

Are both s2member and s2member pro up to date?

:snowman_with_snow:

Yes, they are.

PHP’s error logging and reporting is very detailed and if set too high will flood your logs with spurious messages, so…

add the following to wp-config.php

error_reporting(E_ALL & ~E_WARNING & ~E_NOTICE);

and optionally change these

define('WP_DEBUG', false); // Disable debug mode if enabled
define('WP_DEBUG_LOG', true); // Log errors to wp-content/debug.log instead of displaying
define('WP_DEBUG_DISPLAY', false);
1 Like

Even if you’re using Stripe, the webhook handling could be forwarded to those files. They have paypal in the name because they were only for it originally, later started handling the notifications received for other gateways, but the original developer left the file names.

Do you have s2’s logging enabled? What do the gateway-core-ipn.log entries say? WP Admin > s2Member > Log Files

if you want, you can try editing those files, and see if you stop getting the warnings:

s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-payment-w-level.inc.php

Search:

					list($paypal['level'], $paypal['ccaps']) = preg_split('/\:/', $paypal['item_number'], 3);

Replace with:

					list($paypal['level'], $paypal['ccaps']) = preg_split('/\:/', (string) $paypal['item_number'].':', 3);

s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-cancellation-w-level.inc.php

Search:

										list ($paypal["level"], $paypal["ccaps"]) = preg_split ("/\:/", $paypal["item_number"], 3);

Replace with:

										list ($paypal["level"], $paypal["ccaps"]) = preg_split ("/\:/", (string) $paypal["item_number"] . ":", 3);

s2member/src/includes/classes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php

Search:

					$is_refund             = (preg_match('/^refunded$/i', $paypal['payment_status']) && !empty($paypal['parent_txn_id']));
					$is_reversal           = (preg_match('/^(reversed|reversal)$/i', $paypal['payment_status']) && !empty($paypal['parent_txn_id']));

Replace with:

					$paypal['payment_status'] = isset($paypal['payment_status']) ? $paypal['payment_status'] : '';
					$paypal['mc_currency']    = isset($paypal['mc_currency']) ? $paypal['mc_currency'] : '';
					$is_refund             = (preg_match('/^refunded$/i', $paypal['payment_status']) && !empty($paypal['parent_txn_id']));
					$is_reversal           = (preg_match('/^(reversed|reversal)$/i', $paypal['payment_status']) && !empty($paypal['parent_txn_id']));

:slight_smile: