lemming2030
Forum Replies Created
-
Hi @nickcysupport,
Ah, sorry about that! I thought that the companies are somehow connected.
Thank you for the link – much appreciated! 🙂
Hi @frankremmy,
Thank you for the notification – the update works! 🙂
Have a good one and Happy Holidays!
Hi @frankremmy,
Thank you, much appreciated!
Hi, @frankremmy!
Awesome! Thank you again.
Have a nice day.
EDIT: Here’s a new thread with the exact same issue on a different setup than mine: https://ww.wp.xz.cn/support/topic/critical-error-when-clicking-on-payments-tab/
EDIT 2: I see you already noticed. 🙂
Hi, guys.
This is a WooCommerce bug, I believe.
I started the exact same thread here: https://ww.wp.xz.cn/support/topic/clicking-on-the-payments-tab-causes-a-critical-error-2/
Same fatal (
get_class(null)), same file/line (class-request.php:516), same promotions/spotlight call chain.I’ve confirmed it’s tied specifically to the WooPayments “Payments settings spotlight/promotions” feature. Disabling that injection avoids the fatal while keeping WooPayments fully functional.
I shared a small MU-plugin workaround in my own thread that removes the spotlight callbacks (
enqueue_wc_payment_settings_spotlight/inject_payment_settings_spotlight_container) on the Payments settings screen.This looks like a missing null-check in WooPayments – admin should degrade gracefully and skip promotions rather than fatal.
Hi, @frankremmy!
Thank you for your reply.
on the staging site, you mentioned that disabling all other plugins allowed the Payments tab to load normally.
Yes, that is correct. The Payments tab worked if:
- I disabled the WooPayments plugin or
- Disabled all plugins, except for WooCommerce and WooPayments (but this worked only once – I can’t recreate this by restoring the site and doing this exact same thing).
Did you happen to re‑enable the plugins one by one afterward to see exactly when the issue returns?
I enabled them all at once, not one by one – I wanted to do a quick test.
I know it didn’t behave the same way on the live site, but narrowing down the trigger on staging would really help us pinpoint the root cause.
I did the test on the staging site only, I didn’t want to touch the live site (which is “fixed” with the MU plugin). Once the #4 solution worked, I restored the backup, so I could test it again with this exact approach – but, it didn’t work.
What I can confirm consistently:
The fatal only happens on WooCommerce → Settings → Payments and the stack trace always points to the spotlight/promotions path:
- WC_Payments_Admin->enqueue_wc_payment_settings_spotlight() → WC_Payments_PM_Promotions_Service->get_promotions() → WCPay\Core\Server\Request->apply_filters() → fatal at get_class(null) in class-request.php:516.
- If I disable WooPayments, the Payments tab loads normally.
- If I keep WooPayments enabled but disable only the spotlight/promotions injection (via the MU-plugin), the Payments tab loads normally every time.
The MU-plugin workaround I’m using simply removes these two callbacks when loading the Payments settings screen:
- enqueue_wc_payment_settings_spotlight (admin_enqueue_scripts)
- inject_payment_settings_spotlight_container (admin_footer)
Fatal Error Log: https://pastebin.com/SqSSVQeq
Thank you!
EDIT: This is the MU plugin code which fixes the Payments tab issue: https://pastebin.com/DvyFYACV
- This reply was modified 5 months, 1 week ago by lemming2030.
Hi, @frankremmy!
Thank you for taking the time to provide such a detailed reply – I appreciate it!
I’ve created a staging site to test everything thoroughly and ensure the live environment remains stable.
I tried all your suggested solutions from 1-6.
- This didn’t resolve the error.
- The Payments tab functions properly when WooPayments is disabled.
- I tried PHP versions 8.2 and 8.3, but the issue remained.
- I disabled all the plugins except WooCommerce and WooPayments and the Payments tab is then functioning. Then I enabled all the plugins at once (for a quicker test) and the Payments tab continued to function. Please read on, this is not the solution, unfortunately.
- This didn’t help.
- My site runs on WPX – they confirmed that they don’t block REST requests.
I guess I could try step #4 on my live site, but then again, this didn’t work the second time. I restored the site, did the #4 again (just to make sure it’s a plausable solution), with no success.
I also copy/pasted the error logs to ChatGPT and this is what it said:
“WooPayments expects an object during that promotions request/filter chain, but something in this flow ends up being
null, and WooPayments then callsget_class(null)which fatals. It is an admin-only issue tied specifically to the promotions/spotlight feature on the Payments settings page.”Then it wrote a small MU-plugin workaround that does not disable WooPayments, but prevents the crash by disabling only the WooPayments “spotlight/promotions” injection on the Payments settings page.
Technically, it runs in admin_init, checks it’s on /wp-admin/admin.php?page=wc-settings&tab=checkout and then removes/unsets the WC_Payments_Admin callbacks that enqueue/insert the spotlight UI:
- enqueue_wc_payment_settings_spotlight (on admin_enqueue_scripts)
- inject_payment_settings_spotlight_container (on admin_footer)
As a result, the Payments tab works normally again – it only surpresses the promotional spotlight block.
It concluded with:
“The fatal is caused by a missing null-check inside WooPayments, where
get_class()is called with anullargument. Even if another plugin/server filter causes an unexpected value, WooPayments should not fatal in admin; it should handle failure gracefully and skip promotions UI.”Sorry for such a long post. 🙂 I wonder, if this is a bug, can it be fixed? I can continue to run the MU plugin, but I’d prefer to run the “stock” WooPayments.
Thank you!
Forum: Plugins
In reply to: [Meow Lightbox] Possible to use Lightbox only in a certain category?Sounds good, thank you very much! 🙂
Forum: Plugins
In reply to: [Meow Lightbox] Possible to use Lightbox only in a certain category?Hi @tigroumeow,
Thank you for your reply!
I’d like the Lightbox to be disabled everywhere except in the “Reviews” category, where we do hands-on reviews of various products. Other posts and categories don’t need the option to make the photos larger, but with hands-on reviews, it would be a useful feature.
So that can be done according to the tutorial that you linked to? I’d love to share the URL, but not publicly. :-/ If yes, I’ll ask the developer I work with to look into it. I do understand some CSS and HTML, but I won’t be able to do it alone. 🙂
Thanks again!
Forum: Plugins
In reply to: [Enable Media Replace] WP showing the old image dimensions?Hi, thank you for the help provided via your chat service on ShortPixel.
To sum it up:
1. The fault is on my site due to a caching issue.
2. I’ll do some checks to see if EWWW optimizes the replaced images.Thanks!
Hi,
please consider this ticket closed. We’ll solve this in a non-technical way.
Cheers.
Forum: Plugins
In reply to: [W3 Total Cache] Setting the “Referrer Policy” in “Security Headers”Hello @vmarko,
thank you very much for your prompt and detailed reply. Much appreciated.
All the best,
H.Forum: Plugins
In reply to: [W3 Total Cache] “Sharing Debugger” errors caused by W3TCHello @vmarko,
all right, thank you! I’ll leave it disabled and notify my host about this issue.
I left a review. Thanks again!
Forum: Plugins
In reply to: [W3 Total Cache] “Sharing Debugger” errors caused by W3TCHello @vmarko,
that solved the problem, thank you. 🙂
When you say it worked in the past, have you been using W3 Total cache then?
Have you made any changes or updates since it was the last working?Yes, W3TC comes as standard with WPX hosting, so I’ve used it since day 1. I’m now using WPX for 6 months or so and there have been a few W3TC updates, but I don’t know when the sharing got broken. Other than that, I wasn’t touching the W3TC settings, because WPX has it pre-configured for optimal performance. They also haven’t changed their default settings since 2018.
Do you recommend that I leave Gzip disabled? Or should I just leave it enabled?
Thanks again.
Forum: Plugins
In reply to: [W3 Total Cache] “Sharing Debugger” errors caused by W3TCHello @vmarko,
here are my Minify settings: https://www.dropbox.com/s/vmwa0a6chq95nva/w3tc.pdf?dl=0 (these are all defaults by WPX hosting).
As for
x-turbo-charged-by: LiteSpeed, I’m not sure what this means and if I can control it or not. :-/I’m not using Cloudflare, but WPX has its own CDN.
I also need to point out that sharing my home page URL on FB worked in the past, but I’m not sure when it stopped working and if this was maybe due to W3TC, WordPress or any other updates.
Thank you.