• Testing the plugin, I got the following error:

    Fatal error: Uncaught Error: Call to a member function get_billing_country() on null in /srv/www/htdocs/shop/wp-content/plugins/woocommerce-eu-vat-assistant/src/plugin-main.php:1521 
    Stack trace: 
    #0 /srv/www/htdocs/shop/wp-content/plugins/woocommerce-eu-vat-assistant/src/plugin-main.php(1575): Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant->validate_vat_exemption() 
    #1 /srv/www/htdocs/shop/wp-includes/class-wp-hook.php(290): Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant->woocommerce_checkout_process(false) 
    #2 /srv/www/htdocs/shop/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array) 
    #3 /srv/www/htdocs/shop/wp-includes/plugin.php(478): WP_Hook->do_action(Array) 
    #4 /srv/www/htdocs/shop/wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-order.php(1670): do_action('woocommerce_ord...', false, Object(WC_Order)) 
    #5 /srv/www/htdocs/shop/wp-content/plugins/woocommerce/includes/admin/wc-admin in /srv/www/htdocs/shop/wp-content/plugins/woocommerce-eu-vat-assistant/src/plugin-main.php on line 1521

    I concurrently have a second environment, same plugins (same versions): no error…

    Questions:
    1° Any clue what the error might have caused?
    2° I want to re-install the plugin, but deleting the plugin after deactivating doesn’t work,

    Solved it: just installed the zip over the current install base

    Remaining question: is there a working uninstall?

Viewing 1 replies (of 1 total)
  • Plugin Author Diego

    (@daigo75)

    I haven’t come across that error before, but I suspect that the cause is that something triggered the checkout process in WooCommerce, without a valid customer instance being loaded. Event woocommerce_checkout_process is expected to run only during the checkout process (as the name implies), during which a customer session is initialised.

    In normal circumstances, WC()->customer returns a valid customer object, which is the one that the EU VAT Assistant uses to validate the VAT exemption. In your specific case, it seems that WC()->customer is empty (which should never happen), hence the error.

    I’m afraid that I can’t say what the root cause could be. You could try to go by exclusion, to see if some other plugin, or custom code in the theme, is causing some conflict and removing the customer instance by mistake.

    The uninstall process works just fine. If you can’t reinstall the plugin after removing it from the Plugins panel, it means that WordPress could not delete the plugin folder. Perhaps there are some permission issues, which prevent the deletion of the folder. In such case, you can just delete the folder via FTP, or set the wp-content/plugins folder to be writable. That should be sufficient to solve the issue.

    Note
    The line numbers in your messages don’t seem match the latest version of the EU VAT Assistant. In the latest version (1.12.6.200212), line 1521 in file plugin-main.php is empty. Perhaps the site with the error is running an older version?

Viewing 1 replies (of 1 total)
  • The topic ‘Call to a member function get_billing_country() on null & uninstall’ is closed to new replies.