Update for Klarna (Woocommerce 3.0) - woocommerce

Since Woocommerce released Woocommerce 3.0, Klarnas pay plugin doesn't work.
For example i get this errors.
Notice: country was called incorrectly. Customer properties should not be accessed directly. Backtrace: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/twentyseventeen/page.php'), get_template_part, locate_template, load_template, require('/themes/twentyseventeen/template-parts/page/content-page.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, WC_Shortcodes::checkout, WC_Shortcodes::shortcode_wrapper, WC_Shortcode_Checkout::output, WC_Shortcode_Checkout::checkout, wc_get_template, include('/plugins/woocommerce/templates/checkout/form-checkout.php'), do_action('woocommerce_checkout_order_review'), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_checkout_payment, WC_Payment_Gateways->get_available_payment_gateways, WC_Gateway_Klarna_Part_Payment->is_available, WC_Gateway_Klarna_Part_Payment->check_required_fields, WC_Gateway_Klarna_Helper->get_eid, WC_Legacy_Customer- in /mnt/persist/www/dev10/wp-includes/functions.php on line 4138
And
Notice: WC_Customer::get_country is deprecated since version 3.0! Use WC_Customer::get_billing_country instead. in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830
Notice: WC_Customer::get_country is deprecated since version 3.0! Use WC_Customer::get_billing_country instead. in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830
Notice: WC_Customer::get_country is deprecated since version 3.0! Use WC_Customer::get_billing_country instead. in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830
Notice: WC_Customer::get_country is deprecated since version 3.0! Use WC_Customer::get_billing_country instead. in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830
Notice: WC_Customer::get_country is deprecated since version 3.0! Use WC_Customer::get_billing_country instead. in /mnt/persist/www/dev10/wp-includes/functions.php on line 3830.
Are that anyone who have i solution to this yet?
Thanks!

As stated in my comment, you should really ask Klarna to fix the errors in their plugin. However regarding your other problem, it is easily remedied. At least, it was for me.
Simply do a search for get_country( in your theme and plugin files. Replace all that you find with get_billing_country( instead. I had this referenced in my theme files. Upon changing it the error went away.

Related

Uploaded plugin caused depreciation error WooCommerce

I uploaded a plugin to customize my WooCommerce email headers but it caused a depreciation error in the email that have been sent. How can I fix these errors?
Notice: WC_Order::email_order_items_table is deprecated since version 3.0! Use wc_get_email_order_items instead. in /var/www/html/wp-includes/functions.php on line 3853
Notice: WC_Order_Item_Meta::__construct is deprecated since version 3.1! Use WC_Order_Item_Product instead. in /var/www/html/wp-includes/functions.php on line 3853

PHPUNIT gives COLOR_AUTO undefined class constant

Fatal error: Undefined class constant 'COLOR_AUTO' in C:\xampp\htdocs\zend-doctrine\vendor\phpunit\phpunit\src\Util\Configuration.php on line 584
Call Stack:
0.0018 209368 1. {main}() C:\Users\Bram\AppData\Local\Temp\ide-phpunit.php:0
0.0342 768592 2. IDE_Base_PHPUnit_TextUI_Command::main()
C:\Users\Bram\AppData\Local\Temp\ide-phpunit.php:500
0.0342 771992 3. PHPUnit_TextUI_Command->run()
C:\Users\Bram\AppData\Local\Temp\ide-phpunit.php:243
0.0342 772048 4. IDE_Base_PHPUnit_TextUI_Command->handleArguments()
C:\xampp\php\pear\PHPUnit\TextUI\Command.php:138
0.0342 773256 5. PHPUnit_TextUI_Command->handleArguments()
C:\Users\Bram\AppData\Local\Temp\ide-phpunit.php:248
0.2740 2873064 6. PHPUnit_Util_Configuration->getPHPUnitConfiguration()
C:\xampp\php\pear\PHPUnit\TextUI\Command.php:601
I ran into this error because the phpunit version installed globally on my system (9) was newer than the version in my project (6). I solved this by running PHP unit from the vendor directory as mentioned in this github issue.
Check where is COLOR_AUTO class file and include it in Configuration.php file
It was generated by an old version of PHPSTORM that i was using, bought a new version and it works.

Just updated the Embedly plugin and get this error.

Parse error: syntax error, unexpected '[' in D:\Hosting\2772443\html\wp-content\plugins\embedly\embedly.php on line 535
Can not activate Fatal Error. Is Embedly aware?
Yes, this is a version issue with PHP. A new version of the Embedly plugin will be available later today.

NoMethodError: undefined method "add_import_path"

I recently upgraded my sass and compass version to the latest one. But its giving me an error while I start watcher.
Error is NoMethodError: undefined method add_import_path for main:Object
Please help.
after upgrading sass to 3.4.16 and compass to 1.0.3 add_import_path was giving error of undefined.
So I tried additional_import_paths = [] which is working perfect now.

Undefined class constant 'FOLLOW_SYMLINKS

after installing symfony 2.6 and when executing an error message is displayed:
FatalErrorException in DirectoryResource.php line 82:
Error: Undefined class constant 'FOLLOW_SYMLINKS'
the error is in the bundle: kriswallsmith
Please help me.
thank you in advance
Which versio of PHP are you running under? 5.2?
This sounds awfully similar to this issue report: https://github.com/caefer/sfImageTransformExtraPlugin/issues/5
The class constant, FOLLOW_SYMLINKS, is part of the RecursiveDirectoryIterator, which according to the PHP.net manual page, was added in 5.3.1 and also 5.2.11. At least version 5.3.9 is usually recommended or required by various frameworks because of various issues in prior versions.
The package is "kriswallsmith/assetic"

Resources