• lavendel2

    (@lavendel2)


    Hi,

    When the Super Page Cache for Cloudflare is enabled (together with EDD 3.x); and I purchase a product on the checkout of the Easy Digital Downloads store; a fatal error will be displayed:

    Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, array must have exactly two members in /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php:310 Stack trace: #0 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #1 /home/runcloud/webapps/mainFV/wp-includes/plugin.php(517): WP_Hook->do_action() #2 /home/runcloud/webapps/mainFV/wp-content/plugins/easy-digital-downloads/includes/orders/functions/orders.php(1196): do_action() #3 /home/runcloud/webapps/mainFV/wp-content/plugins/easy-digital-downloads/includes/payments/functions.php(141): edd_build_order() #4 /home/runcloud/webapps/mainFV/wp-content/plugins/edd-recurring/includes/gateways/edd-recurring-gateway.php(640): edd_insert_payment() #5 /home/runcloud/webapps/mainFV/wp-content/plugins/edd-recurring/includes/gateways/edd-recurring-gateway.php(579): EDD_Recurring_Gateway->record_signup() #6 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(308): EDD_Recurring_Gateway->process_checkout() #7 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #8 /home/runcloud/webapps/mainFV/wp-includes/plugin.php(517): WP_Hook->do_action() #9 /home/runcloud/webapps/mainFV/wp-content/plugins/easy-digital-downloads/includes/gateways/functions.php(404): do_action() #10 /home/runcloud/webapps/mainFV/wp-content/plugins/easy-digital-downloads/includes/process-purchase.php(193): edd_send_to_gateway() #11 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(308): edd_process_purchase_form() #12 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #13 /home/runcloud/webapps/mainFV/wp-includes/plugin.php(517): WP_Hook->do_action() #14 /home/runcloud/webapps/mainFV/wp-content/plugins/easy-digital-downloads/includes/actions.php(56): do_action() #15 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(308): edd_post_actions() #16 /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #17 /home/runcloud/webapps/mainFV/wp-includes/plugin.php(517): WP_Hook->do_action() #18 /home/runcloud/webapps/mainFV/wp-settings.php(617): do_action() #19 /home/runcloud/webapps/mainFV/wp-config.php(86): require_once('...') #20 /home/runcloud/webapps/mainFV/wp-load.php(50): require_once('...') #21 /home/runcloud/webapps/mainFV/wp-blog-header.php(13): require_once('...') #22 /home/runcloud/webapps/mainFV/index.php(17): require('...') #23 {main} thrown in /home/runcloud/webapps/mainFV/wp-includes/class-wp-hook.php on line 310

    The fatal error will be removed once I disable the WP CF page cache plugin.

    Can you please have a look at why this fatal error is popping up when the plugin is enabled?

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi,
    just looked at the code of the plugin and don’t see any issues inside the plugin code that may cause this issue.

    The settings mentioned here: https://i.imgur.com/qmm4WCu.jpeg
    are handled like this: https://i.imgur.com/ZFo6Qwx.jpeg
    Where it is using edd_get_option('purchase_page', 0), edd_get_option('success_page', 0), edd_get_option('failure_page', 0), edd_get_option('purchase_history_page', 0), edd_get_option('login_redirect_page', 0) – to determine which EDD page it is.

    Then for this option: https://i.imgur.com/F6isasM.jpeg
    It is using the edd_insert_payment hook (https://docs.easydigitaldownloads.com/article/719-eddinsertpayment) which according to the doc has 2 arguments – to purge the cache.
    So, if EDD has made any changes in the new update that they didn’t update in the docs, then I am not aware of it.

    But still, can you try downloading this version of the plugin on your site and see if it resolves your issue?

    Let me know.

    Thread Starter lavendel2

    (@lavendel2)

    Hello @isaumya — thanks a lot for getting back to me.

    I downloaded the new version of your plugin and installed it on the website. I turned on PHP version 8.1 and made a test transaction from our front. Unfortunately, it’s returning the same fatal error as explained above.

    I also tried to disable the EDD settings (disabling flush) but that’s also resulting in the same error.

    I just downgraded to version 8.0 and that does seem to work with the new version of your plugin. Are there significant features not working on 8.0 compared to 8.1?

    Thread Starter lavendel2

    (@lavendel2)

    BTW, your support is really helpful.

    Thumbs up for that!

    adisaputro25

    (@adisaputro25)

    I’m running this plugin on php8.1 with no issues.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @lavendel2,
    if you are still having the same issue I’m 100% sure that it is not coming from the plugin. The reason I am saying that is there is just 1 edd hook that this plugin uses as I showed you. I am also using this plugin on many 8.1 sites (thought they are not running EDD) including my own sites without any issues.

    Does the problem go away when you disable this plugin?

    As I’ve shared above all the ways this plugin talks to EDD, none of them seems to match the error that you have shared.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error with PHP version 8.1’ is closed to new replies.