• Hi,

    I installed gtm4wp to my WooCommerce site and after that there has been occasional PHP Fatal errors when proceeding from the checkout page to the payment gateway. It seems like the error occurs only when the enhanced ecommerce is activated. After I installed the gtm4wp the problem started and when I disabled ehanced ecommerce the problem stopped. After enabling the ehanced ecommerce again after few days the problem started again. I’ve tried to reproduce the error tens of times but I’ve succeeded only few times and couldn’t find any clues.

    I’ve set up the gtm4wp for both Universal Analytics and Google Analytics 4 with the help of your tutorial and the data is transferring correctly to both of them.

    The error is thrown from the payment plugin:

    [08-Jul-2021 14:54:58 UTC] PHP Fatal error: Uncaught Error: Call to a member function getUrl() on null in /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-content/plugins/op-payment-service-for-woocommerce/src/View/CheckoutForm.php:12
    Stack trace:
    #0 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-content/plugins/op-payment-service-for-woocommerce/src/View.php(43): require()
    #1 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-content/plugins/op-payment-service-for-woocommerce/src/Gateway.php(328): OpMerchantServices\WooCommercePaymentGateway\View->render()
    #2 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-includes/class-wp-hook.php(292): OpMerchantServices\WooCommercePaymentGateway\Gateway->receipt_page()
    #3 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters()
    #4 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-includes/plugin.php(484): WP_Hook->do_action()
    #5 /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-content/plugins/woocommerce/templ in /home/602437.cloudwaysapps.com/eaczbwffkj/public_html/wp-content/plugins/op-payment-service-for-woocommerce/src/View/CheckoutForm.php on line 12

    I’ve contacted their support but after two weeks I’m still waiting contact from their technical team. So I decided to ask if you would have any idea what this could be?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    Thanks for the report.
    If you could somehow add more debug info to your logs, I could check where there might be a connection. For example if I could see what WordPress action is executed in the do_action() call and in the apply_filters() call, that could help me dig deeper.

    Thread Starter mesw

    (@mesw)

    Okey, I’ll try to dig in deeper.

    PS. I’ve disabled enhanced ecommerce on production site to avoid failing orders. Now the testing should be done on this staging site where enhanced ecommerce is still activated.

    • This reply was modified 2 years, 9 months ago by mesw.
    Thread Starter mesw

    (@mesw)

    Hi,

    I’m still beginner in debugging WordPress so I’m not sure if these images help at all. I configured remote xDebugging for the staging site because I couldn’t manage to debug the payment gateway redirection on localhost.

    For some reason I haven’t managed to reproduce this issue on this staging site (at least for now) which is odd. I have tried it bit over 10 times. On production site about 1 out of 5 orders were failed because of this error even though I couldn’t reproduce it myself that often when testing.

    • This reply was modified 2 years, 9 months ago by mesw.
    • This reply was modified 2 years, 9 months ago by mesw.
    Thread Starter mesw

    (@mesw)

    Hi,

    I’m back to work from summer holiday. Still found anything what could cause this or is there something I could do to help with the issue?

    The enhanced ecommerce has been now off for a while and the fatal errors are completely gone. So it is 100% sure that its some kind of plugin conflict. The payment gateway plugin support told that they have time to investigate this issue on the start of August.

    What is weird I still haven’t managed to reproduce the issue on staging site. Well I haven’t tried it that many times but from my experience it should have already occured.

    Plugin Author Thomas Geiger

    (@duracelltomi)

    Hi,

    I am sorry but there is not much I can do from here.
    I would need to reproduce this in a test environment so that I could debug what could cause the issue.

    But if the support of the payment gateway find anything that I can fix, do not hesitate to send me so that I can include it in the next version.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal error when proceeding from checkout to payment gateway’ is closed to new replies.