Skip to content

Commit 5e4bb61

Browse files
author
root
committed
Release 2.1.2
1 parent 3d28ecc commit 5e4bb61

8 files changed

+51
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This repository contains the PostFinance Checkout plugin that enables WooCommerc
1515

1616
## Documentation
1717

18-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.1/docs/en/documentation.html)
18+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.2/docs/en/documentation.html)
1919

2020
## Support
2121

@@ -24,4 +24,4 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/
2424

2525
## License
2626

27-
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/2.1.1/LICENSE) for more information.
27+
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/2.1.2/LICENSE) for more information.

changelog.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,3 +455,13 @@ Tested against:
455455
- Wordpress: 6.1
456456
- Woocommerce: 6.7.0
457457

458+
## Features:
459+
- Added analytics headers.
460+
- Support of Wordpress 6.1.1
461+
- Support of Woocommerce 7.1.0
462+
463+
## Tested against:
464+
- PHP 7.4.32
465+
- Wordpress: 6.1.1
466+
- Woocommerce: 7.1.0
467+

docs/en/documentation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
2222
</a>
2323
</li>
2424
<li>
25-
<a href="https://github.com/pfpayments/woocommerce/releases/tag/2.1.1/">
25+
<a href="https://github.com/pfpayments/woocommerce/releases/tag/2.1.2/">
2626
Source
2727
</a>
2828
</li>

includes/admin/class-wc-postfinancecheckout-admin-settings-page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function get_settings() {
187187
$settings = array(
188188
array(
189189
'links' => array(
190-
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.1/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
190+
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.2/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
191191
'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ),
192192
),
193193
'type' => 'postfinancecheckout_links',

includes/class-wc-postfinancecheckout-helper.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
* @author wallee AG (http://www.wallee.com/)
1212
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Software License (ASL 2.0)
1313
*/
14+
15+
use Automattic\Jetpack\Constants;
1416

1517
if ( ! defined( 'ABSPATH' ) ) {
1618
exit();
@@ -20,6 +22,9 @@
2022
*/
2123
class WC_PostFinanceCheckout_Helper {
2224

25+
const SHOP_SYSTEM = 'x-meta-shop-system';
26+
const SHOP_SYSTEM_VERSION = 'x-meta-shop-system-version';
27+
const SHOP_SYSTEM_AND_VERSION = 'x-meta-shop-system-and-version';
2328

2429
/**
2530
* Instance.
@@ -84,6 +89,9 @@ public function get_api_client() {
8489
if ( ! empty( $user_id ) && ! empty( $user_key ) ) {
8590
$this->api_client = new \PostFinanceCheckout\Sdk\ApiClient( $user_id, $user_key );
8691
$this->api_client->setBasePath( rtrim( $this->get_base_gateway_url(), '/' ) . '/api' );
92+
foreach (self::getDefaultHeaderData() as $key => $value) {
93+
$this->api_client->addDefaultHeader($key, $value);
94+
}
8795
} else {
8896
throw new Exception( __( 'The API access data is incomplete.', 'woo-postfinancecheckout' ) );
8997
}
@@ -528,4 +536,20 @@ protected function restock_items_for_order( WC_Order $order ) {
528536
do_action( 'wc_postfinancecheckout_restocked_order', $order );
529537
}
530538
}
539+
540+
/**
541+
* @return array
542+
*/
543+
protected static function getDefaultHeaderData()
544+
{
545+
$version = Constants::get_constant( 'WC_VERSION' );
546+
547+
$shop_version = str_replace('v', '', $version);
548+
[$major_version, $minor_version, $_] = explode('.', $shop_version, 3);
549+
return [
550+
self::SHOP_SYSTEM => 'woocommerce',
551+
self::SHOP_SYSTEM_VERSION => $shop_version,
552+
self::SHOP_SYSTEM_AND_VERSION => 'woocommerce-' . $major_version . '.' . $minor_version,
553+
];
554+
}
531555
}

includes/class-wc-postfinancecheckout-migration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public static function check_version() {
248248
public static function plugin_row_meta( $links, $file ) {
249249
if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) {
250250
$row_meta = array(
251-
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.1/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
251+
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.2/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
252252
);
253253

254254
return array_merge( $links, $row_meta );

readme.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: customwebgmbh
33
Tags: woocommerce PostFinance Checkout, woocommerce, PostFinance Checkout, payment, e-commerce, webshop, psp, invoice, packing slips, pdf, customer invoice, processing
44
Requires at least: 4.7
55
Tested up to: 6.1
6-
Stable tag: 2.1.1
6+
Stable tag: 2.1.2
77
License: Apache 2
88
License URI: http://www.apache.org/licenses/LICENSE-2.0
99

@@ -23,7 +23,7 @@ To use this extension, a PostFinance Checkout account is required. Sign up on [P
2323

2424
== Documentation ==
2525

26-
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.1/docs/en/documentation.html).
26+
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.2/docs/en/documentation.html).
2727

2828
== Support ==
2929

@@ -56,12 +56,12 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/
5656
== Changelog ==
5757

5858

59-
Features:
60-
- Support of Wordpress 6.1
61-
- Support of Woocommerce 7.0.1
62-
Bugfixes:
63-
- Fix that when 0 manual task are needed, the message ‘0 manuelle Tasks benötigen Ihre Aufmerksamkeit’ is shown.
64-
Tested against:
59+
## Features:
60+
- Added analytics headers.
61+
- Support of Wordpress 6.1.1
62+
- Support of Woocommerce 7.1.0
63+
64+
## Tested against:
6565
- PHP 7.4.32
66-
- Wordpress: 6.1
67-
- Woocommerce: 6.7.0
66+
- Wordpress: 6.1.1
67+
- Woocommerce: 7.1.0

woocommerce-postfinancecheckout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: PostFinance Checkout
44
* Plugin URI: https://wordpress.org/plugins/woo-postfinancecheckout
55
* Description: Process WooCommerce payments with PostFinance Checkout.
6-
* Version: 2.1.1
6+
* Version: 2.1.2
77
* License: Apache2
88
* License URI: http://www.apache.org/licenses/LICENSE-2.0
99
* Author: wallee AG
@@ -45,7 +45,7 @@ final class WooCommerce_PostFinanceCheckout {
4545
*
4646
* @var string
4747
*/
48-
private $version = '2.1.1';
48+
private $version = '2.1.2';
4949

5050
/**
5151
* The single instance of the class.

0 commit comments

Comments
 (0)