Support » Plugin: WooCommerce - Country Based Payments » Fatal php-error and checkout page not loading

  • Resolved niktuo

    (@niktuo)


    Hi,

    I am updating my site and facing a problem with this plugin. With Woocommerce 3.5.4. and WooCommerce – Country Based Payments 1.2.2. the checkout page does not load the payment options and log has the followting error:

    [19-Feb-2019 10:27:37 UTC] PHP Fatal error: Uncaught Error: Call to a member function get_setting() on null in /data/wordpress/htdocs/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php:115
    Stack trace:
    #0 /data/wordpress/htdocs/wordpress/wp-includes/class-wp-hook.php(286): WCML_Currencies_Payment_Gateways->filter_gateway_description(‘Pay safely with…’, ‘stripe’)
    #1 /data/wordpress/htdocs/wordpress/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Pay safely with…’, Array)
    #2 /data/wordpress/htdocs/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-payment-gateway.php(309): apply_filters(‘woocommerce_gat…’, ‘Pay safely with…’, ‘stripe’)
    #3 /data/wordpress/htdocs/wp-content/plugins/woocommerce-gateway-stripe/includes/class-wc-gateway-stripe.php(267): WC_Payment_Gateway->get_description()
    #4 /data/wordpress/htdocs/wp-content/plugins/woocommerce/templates/checkout/payment-method.php(30): WC_Gateway_Stripe->payment_fields()
    #5 /data/wordpress/htdocs/wp-content/ in /data/wordpress/htdocs/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php on line 115

    Deactivating the Country based payments plugin helps and everything works normally without errors. Is this a known issue with the latest Woocommerce version? Any updates coming soon? Thanks for your help!

    Best,
    Niklas

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi Niklas,

    The Country based payments plugin works properly with the latest WooCommerce version but looks like some other plugin is incompatible.

    Can you please give me a list of plugins you use which are related to the WooCommerce?
    That will help me to find a problem.

    Thanks,
    Ivan

    niktuo

    (@niktuo)

    Hi,

    Thanks for the quick reply. I did some further debugging and it seems that this is a conflict with Woocommerce Multilingual (latest version 4.4.2.1). Everything works fine when either Woocommerce Multilingual or Country Based Payments plugin is deactivated.

    So the php error is:
    “Uncaught Error: Call to a member function get_setting() on null in /data/wordpress/htdocs/wp-content/plugins/woocommerce-multilingual/classes/multi-currency/payment-gateways/class-wcml-currencies-payment-gateways.php:115”

    Here below is the line 115 from class-wcml-currencies-payment-gateways.php file:
    $gateway_setting = $this->payment_gateways[ $id ]->get_setting( $client_currency );

    Any suggestions how to proceed with this?

    Thanks.

    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi,

    Thanks for letting me know that.

    I will try to reproduce this error on my dev server and will let you know once I find the solution.

    Ivan

    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi Niklas,

    I have released a new version of the plugin which should fix this problem.
    Please update the plugin.
    Remember to backup your site before making changes.

    Kind regards,
    Ivan

    niktuo

    (@niktuo)

    Hi,

    Thanks for the quick update! Unfortunately the issue still remains and the same error message gets written in the log.

    I made a test with an older version 4.3.6. of Woocommerce multilingual that I was using previously on the site and that works well with the latest Country based plugin. So obviously Woocommerce multilingual team has changed something in the plugin that is not interacting well with Country based payments.

    I can also try to figure out what is the latest version of Woocommerce multilingual plugin that works with country based payments if that helps debugging?

    niktuo

    (@niktuo)

    4.3.7. version of Woocommerce multilingual is the latest version that works with Country based payments 1.1.8.

    Updating 4.4.0 WCML breaks the checkout and it just keep loading without showing the payment options.

    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi,

    Thanks for the detailed report.

    I have released a fix for the previous version which should resolve the issue.
    Let me know the results.

    Kind regards,
    Ivan

    niktuo

    (@niktuo)

    Great thanks! Now everything seems to work with the latest plugin versions. I really appreciate the quick fix. 🙂

    Hi,
    Why this error happened after I delete the Woocomerce?
    Fatal error: Class ‘WC_Payment_Gateway’ not found in /home/storage/0/7e/a9/fundodebolsas/public_html/novosite/wp-content/plugins/woo-asaas/includes/gateway/class-gateway.php on line 24

    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hi @fundodebolsas,

    That means that “woo-asaas” plugin depends on the WooCommerce, and since you deleted Woo it doesn’t work anymore.
    I’m not sure what is the real name of the “woo-asaas” plugin as I’m not the author of that plugin.

    Please note that this is not support thread for the “woo-asaas” plugin, and you should probably ask this question on their support thread.

    Kind regards,
    Ivan

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal php-error and checkout page not loading’ is closed to new replies.