• Resolved davidbrunsden

    (@davidbrunsden)


    I updated my PayPal for WooCommerce plugin today, and now when I try to view my WooCommerce order page, I get the following error message:

    Fatal error: Call to a member function payment_gateways() on null in /home/jadestorecpadmin/public_html/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-emails.php on line 252

    I followed the instructions for the update, but it appears to be having some sort of issue with WCML.

    More info:
    PayPal for WooCommerce version: 1.4.0
    WooCommerce Multilingual version: 4.1.2

    Any advice?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello, we are going to fix this in the upcoming release of WooCommerce Multilingual.
    As a temporary workaround, you can patch this by going and editing the file in \wp-content\plugins\woocommerce-multilingual\inc\class-wcml-emails.php in the function filter_payment_method_string() and replace line 250:

    
                if( $payment_method ){
    

    with

    
        if( $payment_method  && isset( WC()->payment_gateways ) ){ 
    

    Hi!

    Thank you so much for this. I was facing the same problem with WooCommerce extension “Alipay Cross Border Payment Gateway” too! Looking forward to the next release of WooCommerce Multilingual!

    Jane

    Thx for het workaround, but when i replace line 250 as you say i get 503 service unavailable error. Is there another workaround for this problem? I’m using Mollie payment plugin for ideal payment.

    @oopixjane you are welcome.

    @peterminator were you using WooCommerce Multilingual 4.1.2? Did you replace exactly the value:

    
     if( $payment_method ){
    

    ?
    If you were using an older version, there might have been something else at that line number so better search for the exact code that I mentioned above.

    Perhaps you should enable debugging in WordPress and let me know of the error that you are getting behind that Error 503.

    Yes thx, I;ll debug. I did replace the exact code on the exact line.

    If you are having any difficulties, you can always create a new ticket on our official support forum at wpml.org where our specialists could help you in the debug.
    Do note that this is not the final code, and it is a code just a temporary code for workaround related to the issue that was originally reported.

    Thx alot. It’s solved. I raised the maximum execution time, think that solved the problem. Thx for the fast reply.

    I am very happy to hear that the issue is resolved for you as well!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal Error with recent PayPal for WooCommerce update’ is closed to new replies.