Support » Plugin: Accept Stripe Payments » An error of type E_ERROR was caused in line 9 of the file

  • Resolved readysteadywebsites

    (@readysteadywebsites)


    Hey there, love your plugin but we’re getting the following on a number of our sites that have auto-updated.

    Any ideas on a fix?

    An error of type E_ERROR was caused in line 9 of the file /public_html/wp-content/plugins/stripe-payments/includes/recaptcha/admin/asp-recaptcha-admin-menu.php. Error message: Uncaught Error: Class ‘AcceptStripePayments_Admin’ not found in /public_html/wp-content/plugins/stripe-payments/includes/recaptcha/admin/asp-recaptcha-admin-menu.php:9
    Stack trace:
    #0 /public_html/wp-content/plugins/stripe-payments/includes/recaptcha/asp-recaptcha-main.php(28): ASPRECAPTCHA_admin_menu->__construct()
    #1 /public_html/wp-includes/class-wp-hook.php(292): ASPRECAPTCHA_main->plugins_loaded()
    #2 /public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
    #3 /public_html/wp-includes/plugin.php(484): WP_Hook->do_action()
    #4 /public_html/wp-settings.php(423): do_action()
    #5 /public_html/wp-config.php(74): require_once(‘/home/367153.cl…’)
    #6 /public_html/wp-load.php

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Support mbrsolution

    (@mbrsolution)

    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.

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    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.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    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?

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    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.

    egene

    (@egene)

    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

    egene

    (@egene)

    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.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    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/

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    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?

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    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.

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    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.

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    Sadly this hasn’t worked one of those 10 sites has just sent another error during a cron event.

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    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';
    
    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    Thanks, we’ve added that to our 10 test sites and will monitor for the next 24 hours

    Thread Starter readysteadywebsites

    (@readysteadywebsites)

    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?

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘An error of type E_ERROR was caused in line 9 of the file’ is closed to new replies.