Skip to content

Commit

Permalink
Merge pull request #432 from krokedil/develop
Browse files Browse the repository at this point in the history
Version 2.6.3
  • Loading branch information
MichaelBengtsson authored Nov 17, 2021
2 parents 275f11a + 29eda6c commit 665b998
Show file tree
Hide file tree
Showing 17 changed files with 1,398 additions and 10,779 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/dockerimage.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "CI"

on:
pull_request:
branches:
- develop
- master
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/phpcs.yml"

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install PHP_CodeSniffer
run: |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --version
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git wpcs
php phpcs.phar --config-set installed_paths wpcs
php phpcs.phar -i
- uses: thenabeel/action-phpcs@v8
with:
files: "**.php"
phpcs_path: php phpcs.phar
standard: phpcs.ruleset.xml
1 change: 0 additions & 1 deletion Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion classes/class-kco-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,4 @@ public static function kco_wc_log_js() {
wp_die();
}
}

KCO_AJAX::init();
4 changes: 4 additions & 0 deletions classes/class-kco-subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ public function set_recurring_token_for_order( $order_id = null, $klarna_order =
foreach ( $subscriptions as $subscription ) {
update_post_meta( $subscription->get_id(), '_kco_recurring_token', $recurring_token );
}

// Also update the renewal order with the new recurring token.
update_post_meta( $order_id, '_kco_recurring_token', sanitize_key( $recurring_token ) );

} else {
$wc_order->add_order_note( __( 'Recurring token was missing from the Klarna order during the checkout process. Please contact Klarna for help.', 'klarna-checkout-for-woocommerce' ) );
$wc_order->set_status( 'on-hold' );
Expand Down
2 changes: 1 addition & 1 deletion classes/requests/helpers/class-kco-request-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function get_order_line_fees( $order_fee ) {
'name' => substr( $order_fee->get_name(), 0, 254 ),
'quantity' => $order_fee->get_quantity(),
'total_amount' => $this->get_fee_total_amount( $order, $order_fee ),
'unit_price' => $this->get_fee_unit_price( $order, $order_fee ),
'unit_price' => $this->get_fee_unit_price( $order_fee ),
'total_tax_amount' => $this->get_fee_total_tax_amount( $order, $order_fee ),
'tax_rate' => ( '0' !== $order->get_total_tax() ) ? $this->get_order_line_tax_rate( $order, current( $order->get_items( 'fee' ) ) ) : 0,
);
Expand Down
17 changes: 0 additions & 17 deletions docker-compose.phpunit.yml

This file was deleted.

62 changes: 0 additions & 62 deletions docker-compose.yml

This file was deleted.

6 changes: 3 additions & 3 deletions klarna-checkout-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* Description: Klarna Checkout payment gateway for WooCommerce.
* Author: Krokedil
* Author URI: https://krokedil.com/
* Version: 2.6.2
* Version: 2.6.3
* Text Domain: klarna-checkout-for-woocommerce
* Domain Path: /languages
*
* WC requires at least: 4.0.0
* WC tested up to: 5.8.0
* WC tested up to: 5.9.0
*
* Copyright (c) 2017-2021 Krokedil
*
Expand All @@ -35,7 +35,7 @@
/**
* Required minimums and constants
*/
define( 'KCO_WC_VERSION', '2.6.2' );
define( 'KCO_WC_VERSION', '2.6.3' );
define( 'KCO_WC_MIN_PHP_VER', '5.6.0' );
define( 'KCO_WC_MIN_WC_VER', '3.9.0' );
define( 'KCO_WC_MAIN_FILE', __FILE__ );
Expand Down
3 changes: 1 addition & 2 deletions phpcs.ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>

<rule ref="WordPress-Core" />
<rule ref="WordPress-Docs" />
<rule ref="WordPress" />

<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
Expand Down
26 changes: 0 additions & 26 deletions phpunit-docker.xml

This file was deleted.

26 changes: 0 additions & 26 deletions phpunit.xml

This file was deleted.

35 changes: 0 additions & 35 deletions readme.dev.txt

This file was deleted.

9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ Contributors: klarna, krokedil, automattic
Tags: woocommerce, klarna, ecommerce, e-commerce, checkout
Donate link: https://klarna.com
Requires at least: 4.0
Tested up to: 5.8.0
Tested up to: 5.8.2
Requires PHP: 7.0
WC requires at least: 4.0.0
WC tested up to: 5.8.0
WC tested up to: 5.9.0
Stable tag: trunk
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -62,6 +62,11 @@ For help setting up and configuring Klarna Checkout for WooCommerce please refer
* This plugin integrates with Klarnas V3 platform. You need an agreement with Klarna specific to the V3 platform to use this plugin.

== Changelog ==
= 2021.11.17 - version 2.6.3 =
* Fix - Fixed an issue where we would sometimes print the same error notices twice.
* Fix - Fixed a bug that could cause incorrect order totals when using a fee with admin created orders / pay for order links.
* Fix - Fixed an issue where we did not update the renewal order with a new recurring token after the customer changes payment method for their subscription.

= 2021.10.26 - version 2.6.2 =
* Fix - Fixed an issue where we sent the incorrect giftcard amount to Klarna when using WC Giftcards.
* Tweak - Updated URLs to our documentation.
Expand Down
1 change: 0 additions & 1 deletion templates/klarna-checkout.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @package klarna-checkout-for-woocommerce
*/

wc_print_notices();

do_action( 'woocommerce_before_checkout_form', WC()->checkout() );

Expand Down
Loading

0 comments on commit 665b998

Please sign in to comment.