WPPizza – A Restaurant Plugin for WordPress › Support › General Support › PayPal error
- AuthorPosts
- 4 July, 2025 at 9:15 pm #71175
Hi Olly,
I’ve been having a problem for the past 5 days with several customers. All of them are using the new version of PayPal (5.4). Here’s the issue:
Customers place their orders and pay successfully – the payment goes through on PayPal, but no order is recorded in our system.Luckily, some customers noticed this through their PayPal payment confirmation, but not all of them. This has now started happening very frequently.
We’ve checked everything on our end but couldn’t find any issue. I also called PayPal to ask if there’s a problem on their side, but they said everything looks fine. They mentioned they will review the PayPal logs again.
Do you have any idea what might be causing this? I really need your help with this.
4 July, 2025 at 10:31 pm #71190> for the past 5 days with several customers
As nothing has changed for month in the wppizza plugin and indeed the paypal one, the first question really would be what it is that changed your end about 5 days ago ?that aside, have you enabled debug (https://docs.wp-pizza.com/troubleshooting/) and checked your debug.log ?
Are all of your other plugins/themes up to date ?
6 July, 2025 at 2:26 pm #711996 July, 2025 at 9:03 pm #71203Hello Olly,
Quick update: Today, I experienced issues with almost all of my customers. The problems affected those using the new version 5.4. In contrast, only one customer reported any issues with the older version 5.1.2.
I’m able to make changes to the new version if needed—just wanted to share this information in case it helps us identify the root cause more easily.
Thank you very much for your continued support.
Best regards,
6 July, 2025 at 9:43 pm #71204> I’ll share the log file with you.
I haven’t received anything ?!>I haven’t made any changes
But your host may have .For example update php versions – though that should be a good thing – or some firewall updates or what not. I cannot guess of course. But let’s start with the debug.log6 July, 2025 at 11:18 pm #71205This reply has been marked as private.7 July, 2025 at 9:00 am #71206Hi,
I’ve started noticing error log warnings on my website recently, and after checking the
php_errorlog
file, it seems that several issues are being caused by the WPPizza plugins. These errors appear frequently and could affect stability or performance.Below is a detailed report with the exact warnings and the plugins involved. Could you please look into this and advise on a possible fix or update?
Thanks in advance for your help!
🔧 Plugin: WPPizza XSELLS
Warning:
PHP Warning: Undefined array key 4 in /wp-content/plugins/wppizza-xsells/v3x.actions.php on line 1672
PHP Warning: Undefined array key 6 in /wp-content/plugins/wppizza-xsells/v3x.actions.php on line 1672
PHP Warning: Trying to access array offset on value of type null in /wp-content/plugins/wppizza-xsells/v3x.actions.php on line 1672Explanation:
The plugin is trying to access array elements that are either missing or null. This likely occurs when product cross-sell logic expects a key that doesn’t exist, possibly due to incomplete input data. These warnings repeat frequently in the error log.—
🔧 Plugin: WPPizza Sessions
Warning:
PHP Warning: Trying to access array offset on value of type null in /wp-content/plugins/wppizza/classes/class.wppizza.sessions.php on line 1558Explanation:
A variable expected to be an array is actually null. This may relate to temporary session data during checkout.—
🔧 Plugin: WPPizza PayPal Gateway
Warning:
PHP Warning: Undefined array key “ordervars” in /wp-content/plugins/wppizza-gateway-paypal/v3x.php on line 553
PHP Warning: Trying to access array offset on value of type null in /wp-content/plugins/wppizza-gateway-paypal/v3x.php on line 553Explanation:
This occurs when the plugin attempts to access"ordervars"
without validating that the key exists. It could impact payment processing or order data handling.—
✅ Suggested fix:
It would be helpful to addisset()
orarray_key_exists()
checks before accessing these array keys. This would avoid unnecessary PHP warnings and improve the code’s robustness.Please let me know if a patch is available or if you need any additional information.
Thanks again.
7 July, 2025 at 9:16 am #71208most (if not all) of these are symptoms not the cause.
if “ordervars” does not exist there is something severely wrong elsewhere
so , yet again, I need the (full) debug log
Your “suggested fix” would cause more harm than good7 July, 2025 at 9:34 am #71209Sorry, didnt see the link to the debug amongst all of this
will have a look7 July, 2025 at 10:33 am #71210A few observations.
a) the debug log you sent me has none of these warnings you are referring to above in it
b) it does however have several hundred entries per day ofPHP Warning: session_start(): Cannot start session when headers already sent in
. PLease refer to https://docs.wp-pizza.com/troubleshooting/?section=headers-already-sent.
That said, I also believe this is more of the symptom than the cause
c) when trying to to verify the order at paypal, paypal respondes with a 403 error – i.e access forbidden (again, I think this is also only a symptom , not the cause)What is definitely a problem – which may or may not be the root cause for everything but certainly one of it – is that you are caching you order page. Or more accurately, you are putting the checkout (widget) onto your article pages which are cached.
You must not cache any pages that have the checkout ‘widget’ on them or take steps to work around this (see also https://docs.wp-pizza.com/getting-started/?section=setup)
This is definitely something that needs fixing first. Once you have done that, see if you still have issues and report back7 July, 2025 at 1:08 pm #71217We’ve carefully followed your recommendations regarding the caching issue. Specifically:
We reviewed the caching setup in SG Optimizer (SiteGround).
We excluded the entire order page (/ordina-online/) and all its related subpages from caching.
(/il-mio-account/carrello/)
(/carrello/)We double-checked that the WPPizza cart is properly displayed on all menu pages.
No changes have been made to the plugin versions or site settings recently.
We’ll continue to monitor the situation and report back if the problem persists, but your explanation really helped clarify things. Much appreciated!
Everything works now
Best regards,
Maurizio7 July, 2025 at 2:41 pm #71218the debug.log you attached above is referring to a website where it’s all still as it was and you WILL have problems there
your ‘carrello’ , ‘/il-mio-account/carrello/’ urls may well be working but I cannot know as there’s no domain mentioned related to those in this thread.
9 July, 2025 at 7:37 pm #71299Hello Olly, unfortunately, the same problem still exists for customers. This is a serious issue because every day it happens that, even though I haven’t changed anything, the problem suddenly appears again and I can’t continue working. Please help me.
Thank you very much for your support9 July, 2025 at 7:57 pm #713009 July, 2025 at 8:53 pm #71301so what does your debug.log say on that site ?
9 July, 2025 at 9:14 pm #71305there’s also a lot of stuff does does not work because of the way things are minified / combined
i cannot know what exactly is causing what, but I would start by disabling any kind of caching plugins you have running
(three also seems to be a siteground caching thing going on of some sort)In short though,
– what does your debug.log say
– can you reproduce the problem consistently
– if so, do you have the same problem if you disable *all* non-wppizza plugins and use a default theme
(in other words see : https://docs.wp-pizza.com/troubleshooting/ )9 July, 2025 at 9:22 pm #71306PS: your siteground generated combined js throws continuous errors as soon as anything gets amended on the order page
I would advise you to disable any kind of caching, minifications and those sorts of thing to start off with and see what happens then.10 July, 2025 at 3:13 pm #71309Hi Olly,
Thanks a lot for your support and the detailed guidance — it helped a lot.
I wanted to confirm that everything is now working correctly on my side. I tested the PayPal integration in sandbox mode exactly as suggested:
I used the PayPal sandbox business and buyer accounts
Enabled Sandbox Mode in WPPizza → Gateways
Added the correct REST credentials (Client ID and Secret)
Performed multiple test orders successfully using the PayPal checkout button
In addition, I had to make some important adjustments to the cache and optimization settings on my site, which were causing the missing orders issue.
✅ Here’s what I did:
I excluded the following pages and URL patterns from caching:
/?wppizza-listener=paypalipn/
/?wppizza-listener=paypalreturn/
/il-mio-account/*
/checkout/*
/?paypal*
/ordina-online/*I also disabled minification and combination of CSS and JavaScript for anything related to the WPPizza plugin, as I noticed serious issues triggered by SiteGround Optimizer’s combined scripts (as you mentioned).
At the moment, everything seems to be running fine again.
Thanks again for your help!
If the issue returns, I guess I will have to completely disable all caching and minification features on the site to ensure full stability.
Best regards,
Maurizio - AuthorPosts
- You must be logged in to reply to this topic.