Hi, thank you for reporting this. I have submitted a message to the plugin developers to investigate further your findings.
Kind regards.
Plugin Author
mra13
(@mra13)
I am not seeing this error anywhere else. What PHP version is being used on this server? Please make sure that the server is not using a very old PHP version. You can ask the hosting provider and tell them to use something like PHP7.4 on your site.
We are running PHP7.4 on all our servers. This error has come up on 40+ sites now using your plugin. It would be great if you were able to help us investigate.
Hi.
This looks like a conflict with some other plugin. But let us try to figure it out.
1. Are you using any add-ons (except of the core Accept Stripe Payments plugin)?
2. Which version of the core plugin are you using? Current version 2.0.37 was released two months ago. Have you just updated to it the issue started popping it?
3. When this error is displayed? E.g. during popup display, payment process itself etc.
4. Can you try to disable ALL plugins BUT Accept Stripe Payments on one of your sites and see if this fixes the error?
thank you, I’m not sure why its a conflict with another plugin though
1. No
2. It’s happening with latest and older versions across multiple versions of WP.
3. Error is showing as part of a default WP cron process – trying to narrow down what process this is
4. We’ll try this now but we’ll need to wait for the cron to run again.
I am seeing same issue, the error happens when WP is trying to run cron jobs.
WordPress version: 5.3.9
Plugin: Accept Stripe Payments 2.0.47
PHP version: 7.4.3
I assume not all pieces of the plugin are loaded when WP is running cron jobs, but some other pieces are and they rely on that Admin class.
Hi.
Does it happen during a specific cron job or all cron jobs?
You can force run cron jobs using WP Crontrol plugin https://wordpress.org/plugins/wp-crontrol/
Thanks @alexanderfoxc , I’ve been through all the cron jobs and manually pushed all of them but I’ve been unable to replicate the issue manually so far.
It happens every morning when the WP cron is running though. I’m getting around 100 emails a day now with this error.
Are you able to look at the plugin load order as suggested by @egene above?
I haven’t been able to reproduce the issue as well, unfortunately.
But let us try something and see if this helps.
Edit stripe-payments/includes/recaptcha/asp-recaptcha-main.php
file and change line #10
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
to
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ), 100 );
Let me know if this fixed the issue.
Thanks @alexanderfoxc I’ve put that fix on 10 sites and will monitor them over the next 24 hours to see if they show any more errors.
Sadly this hasn’t worked one of those 10 sites has just sent another error during a cron event.
Ok, let’s do it bluntly.
Please undo the previous change in that file.
Now, change following file stripe-payments/accept-stripe-payments.php
. Line #43 looks like this by default:
require_once WP_ASP_PLUGIN_PATH . 'includes/class-asp.php
make it look like this:
require_once WP_ASP_PLUGIN_PATH . 'admin/class-asp-admin.php';
require_once WP_ASP_PLUGIN_PATH . 'includes/class-asp.php';
Thanks, we’ve added that to our 10 test sites and will monitor for the next 24 hours
Hi @alexanderfoxc I can confirm that the fix above has stopped the wp cron error. Although I see you’ve released a new version since yesterday that doesn’t have the fix in it?
Or have you provided a fix another way?