Skip to content

Commit 443ac7d

Browse files
author
root
committed
Release 2.1.17
1 parent ce70732 commit 443ac7d

9 files changed

+100
-15
lines changed

.github/workflows/woo-publish.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release Plugin
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
tag:
9+
name: New release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Setup
16+
env:
17+
WORDPRESS_ORG_SLUG: ${{ vars.WORDPRESS_ORG_SLUG }}
18+
WHITELABEL: ${{ vars.WHITELABEL_NAME }}
19+
FAQ_ENTRIES: ${{ vars.FAQ_ENTRIES }}
20+
FEATURES: ${{ vars.FEATURES }}
21+
run: |
22+
echo $GITHUB_WORKSPACE
23+
echo $WORDPRESS_ORG_SLUG
24+
ls -ltrh
25+
git clone https://github.com/squizlabs/PHP_CodeSniffer.git phpcs;
26+
git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git wpcs;
27+
cd phpcs;
28+
./bin/phpcs --config-set installed_paths ../wpcs;
29+
cd ../;
30+
ls -ltrh
31+
pwd
32+
mkdir -p $GITHUB_WORKSPACE/build-woo/src;
33+
rsync -r --exclude 'build-woo' --exclude 'wpcs' --exclude 'phpcs' --exclude '.git' --exclude '.github' --exclude '.travis.yml' --exclude 'README.md' . $GITHUB_WORKSPACE/build-woo/src;
34+
perl -plne 'print "$ENV{'FEATURES'}" if(/== Installation ==/); print "$ENV{'FAQ_ENTRIES'}" if(/== Changelog ==/);' $GITHUB_WORKSPACE/build-woo/src/readme.txt > $GITHUB_WORKSPACE/build-woo/src/readme_mod.txt;
35+
mv build-woo/src/readme_mod.txt build-woo/src/readme.txt;
36+
mkdir build-woo/$WORDPRESS_ORG_SLUG;
37+
rsync -r build-woo/src/ build-woo/$WORDPRESS_ORG_SLUG/;
38+
39+
- name: Zip & Sniff
40+
env:
41+
WORDPRESS_ORG_SLUG: ${{ vars.WORDPRESS_ORG_SLUG }}
42+
WHITELABEL: ${{ vars.WHITELABEL_NAME }}
43+
run: |
44+
ls -ltrh;
45+
cd $GITHUB_WORKSPACE/build-woo/
46+
zip -r $GITHUB_WORKSPACE/$WORDPRESS_ORG_SLUG.zip $WORDPRESS_ORG_SLUG;
47+
rm -rf src/docs;
48+
../phpcs/bin/phpcbf -n --standard=WordPress src/ --ignore=/src/$WHITELABEL-sdk || true;
49+
../phpcs/bin/phpcs -n --standard=WordPress src/ --ignore=/src/$WHITELABEL-sdk || true;
50+
51+
- name: Upload binaries to Github release
52+
uses: svenstaro/upload-release-action@v2
53+
with:
54+
repo_token: ${{ secrets.GITHUB_TOKEN }}
55+
file: ${{ vars.WORDPRESS_ORG_SLUG }}.zip
56+
asset_name: ${{ vars.WORDPRESS_ORG_SLUG }}
57+
tag: ${{ github.ref }}
58+
59+
- name: WordPress Plugin Deploy
60+
id: deploy
61+
uses: 10up/action-wordpress-plugin-deploy@stable
62+
with:
63+
generate-zip: true
64+
env:
65+
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
66+
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
67+
ASSETS_DIR: ${{ vars.WORDPRESS_ORG_SLUG }}/build-woo/src
68+
SLUG: ${{ vars.WORDPRESS_ORG_SLUG }}

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.16/docs/en/documentation.html)
18+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.17/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.16/LICENSE) for more information.
27+
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/2.1.17/LICENSE) for more information.

changelog.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,3 +606,14 @@ Tested against:
606606
* [Tested Against] Woocommerce 7.7.0
607607
* [Tested Against] PHP SDK 3.2.0
608608

609+
* [Features] Support of Wordpress 6.2.1
610+
* [Features] Support of Wordpress 6.2.2
611+
* [Features] Support of Woocommerce 7.7.1
612+
* [BugFix] Fix the fatal error raised when using non-whitelabel payment method
613+
* [BugFix] Fix the error raised when using the Coupon *Sign Up Fee % Discount*
614+
615+
* [Tested Against] PHP 8.0.28
616+
* [Tested Against] Wordpress 6.2.0
617+
* [Tested Against] Woocommerce 7.7.0
618+
* [Tested Against] PHP SDK 3.2.0
619+

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.16/">
25+
<a href="https://github.com/pfpayments/woocommerce/releases/tag/2.1.17/">
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.16/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
190+
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.17/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-migration.php

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

255255
return array_merge( $links, $row_meta );

includes/service/class-wc-postfinancecheckout-service-line-item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ protected function create_product_line_items_from_order( WC_Order $order ) {
375375
if ( $coupon_discount > 0 ) {
376376
//there is some coupon discount applied
377377
$amount = $amount_including_tax;
378-
$discount = $amount_including_tax - $discount_including_tax - $coupon_discount;
378+
$discount = abs($amount_including_tax - $discount_including_tax - $coupon_discount);
379379
}
380380

381381
$line_item->setAmountIncludingTax( $this->round_amount( $amount, $currency ) );

readme.txt

Lines changed: 7 additions & 3 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.2
6-
Stable tag: 2.1.16
6+
Stable tag: 2.1.17
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.16/docs/en/documentation.html).
26+
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/2.1.17/docs/en/documentation.html).
2727

2828
== Support ==
2929

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

5858

59-
* [BugFix] Fix the thankyou page redirection issue
59+
* [Features] Support of Wordpress 6.2.1
60+
* [Features] Support of Wordpress 6.2.2
61+
* [Features] Support of Woocommerce 7.7.1
62+
* [BugFix] Fix the fatal error raised when using non-whitelabel payment method
63+
* [BugFix] Fix the error raised when using the Coupon *Sign Up Fee % Discount*
6064

6165
* [Tested Against] PHP 8.0.28
6266
* [Tested Against] Wordpress 6.2.0

woocommerce-postfinancecheckout.php

Lines changed: 8 additions & 6 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.16
6+
* Version: 2.1.17
77
* License: Apache2
88
* License URI: http://www.apache.org/licenses/LICENSE-2.0
99
* Author: wallee AG
@@ -46,7 +46,7 @@ final class WooCommerce_PostFinanceCheckout {
4646
*
4747
* @var string
4848
*/
49-
private $version = '2.1.16';
49+
private $version = '2.1.17';
5050

5151
/**
5252
* The single instance of the class.
@@ -226,11 +226,13 @@ public function secure_redirect_order_confirmed($order_id) {
226226
$wc_service_transaction = WC_PostFinanceCheckout_Service_Transaction::instance();
227227
$sdk_service_transaction = new \PostFinanceCheckout\Sdk\Service\TransactionService(WC_PostFinanceCheckout_Helper::instance()->get_api_client());
228228
$wc_transaction_info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_order_id($order_id);
229-
$state = $sdk_service_transaction->read(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id())->getState();
230229

231-
if ($state == \PostFinanceCheckout\Sdk\Model\TransactionState::CONFIRMED) {
232-
wp_redirect($wc_service_transaction->get_payment_page_url(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id()));
233-
exit;
230+
if (property_exists($wc_transaction_info,'get_transaction_id')) {
231+
$state = $sdk_service_transaction->read(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id())->getState();
232+
if ($state == \PostFinanceCheckout\Sdk\Model\TransactionState::CONFIRMED) {
233+
wp_redirect($wc_service_transaction->get_payment_page_url(get_option(self::CK_SPACE_ID), $wc_transaction_info->get_transaction_id()));
234+
exit;
235+
}
234236
}
235237
}
236238

0 commit comments

Comments
 (0)