Skip to content

Commit 4cfdfb5

Browse files
Release 3.0.5
1 parent 7b38f85 commit 4cfdfb5

File tree

10 files changed

+49
-22
lines changed

10 files changed

+49
-22
lines changed

README.md

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

1717
## Documentation
1818

19-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.4/docs/en/documentation.html)
19+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.5
20+
/docs/en/documentation.html)
2021

2122
## Support
2223

@@ -33,4 +34,5 @@ ____________________________________________________________________________
3334

3435
## License
3536

36-
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.4/LICENSE) for more information.
37+
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.5
38+
/LICENSE) for more information.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array('@woocommerce/blocks-registry', 'react', 'wp-polyfill'), 'version' => '78fcd801e94ec69893e5');
1+
<?php return array('dependencies' => array('@woocommerce/blocks-registry', 'react', 'wp-polyfill'), 'version' => 'f90624c2cfe550c136e5');

assets/js/frontend/blocks/build/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/js/frontend/checkout.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,12 @@ jQuery(
133133
);
134134
self.handle_description_for_empty_iframe( current_method );
135135
self.handle_place_order_button_status( current_method );
136+
137+
// Reload the iframe if it exists, so the iframe's form has all the field data filled by the user
138+
let iframe = document.getElementById('payment-form-' + current_method).querySelector('iframe');
139+
if (iframe) {
140+
iframe.src = iframe.src;
141+
}
136142
},
137143

138144
handle_description_for_empty_iframe : function(method_id) {

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,3 +756,10 @@ Tested against:
756756
- [Tested Against] Woocommerce 8.7.0
757757
- [Tested Against] PHP SDK 4.0.2
758758

759+
= 3.0.5 - April 25 2024 =
760+
- [Bugfix] Notification message in admin panel is now truly dissmisable.
761+
- [Tested Against] PHP 8.2
762+
- [Tested Against] Wordpress 6.5
763+
- [Tested Against] Woocommerce 8.7.0
764+
- [Tested Against] PHP SDK 4.0.2
765+

docs/en/documentation.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ <h2>Documentation</h2> </div>
2323
</a>
2424
</li>
2525
<li>
26-
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.4/">
26+
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.5
27+
/">
2728
Source
2829
</a>
2930
</li>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ public function get_settings() {
187187
$settings = array(
188188
array(
189189
'links' => array(
190-
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.4/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
190+
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.5
191+
/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
191192
'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ),
192193
),
193194
'type' => 'postfinancecheckout_links',

includes/class-wc-postfinancecheckout-migration.php

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ 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/3.0.4/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/3.0.5
253+
/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
253254
);
254255

255256
return array_merge( $links, $row_meta );
@@ -354,7 +355,7 @@ public static function update_1_0_0_initialize() {
354355
`updated_at` datetime NOT NULL,
355356
`restock` varchar(1) COLLATE utf8_unicode_ci,
356357
`items` longtext COLLATE utf8_unicode_ci,
357-
`failure_reason` longtext COLLATE utf8_unicode_ci,
358+
`failure_reason` longtext COLLATE utf8_unicode_ci,
358359
PRIMARY KEY (`id`),
359360
KEY `idx_transaction_id_space_id` (`transaction_id`,`space_id`),
360361
KEY `idx_completion_id_space_id` (`completion_id`,`space_id`)
@@ -579,18 +580,26 @@ public static function update_1_0_6_shorten_table_names() {
579580
}
580581

581582
/**
582-
* Shows notification if there are unsupported features with woocommerce version.
583-
*
583+
* Shows a notice in the admin section if the WooCommerce version installed is not officially yet supported by us.
584+
*
584585
* @return void
585586
*/
586-
public static function supported_payments_integration_notice() {
587+
public static function supported_payments_integration_notice(): void {
587588
$woocommerce_data = get_plugin_data( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php', false, false );
588-
589+
589590
if (version_compare( $woocommerce_data['Version'], WC_POSTFINANCECHECKOUT_REQUIRED_WC_MAXIMUM_VERSION, '>' )) {
590-
$class = 'notice notice-info is-dismissible';
591-
$message = __( 'A version of the PostFinanceCheckout plugin is yet to be released for this version of WooCommerce.', 'sample-text-domain' );
592-
593-
printf( '<div class="%1$s"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );
591+
$notice_id = "postfinancecheckout-{$woocommerce_data['Version']}-not-yet-supported";
592+
if (!WC_Admin_Notices::user_has_dismissed_notice($notice_id)) {
593+
$message = sprintf(__( 'The plugin PostFinanceCheckout has been tested up to WooCommerce %1$s but you have installed the version %2$s. Please notice that this is not recommended.' , 'woo-postfinancecheckout'), WC_POSTFINANCECHECKOUT_REQUIRED_WC_MAXIMUM_VERSION, $woocommerce_data['Version']);
594+
WC_Admin_Notices::add_custom_notice($notice_id, esc_html( $message ));
595+
596+
// Clean up previous dismissals stored in the user data, from previous versions.
597+
$previous_version = get_user_meta(get_current_user_id(), "postfinancecheckout-previous-wc-min-version");
598+
if ($previous_version) {
599+
delete_user_meta(get_current_user_id(), "dismissed_postfinancecheckout-{$previous_version[0]}-not-yet-supported_notice");
600+
}
601+
update_user_meta(get_current_user_id(), "postfinancecheckout-previous-wc-min-version", $woocommerce_data['Version']);
602+
}
594603
}
595604
}
596605
}

readme.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: postfinancecheckout AG
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: 3.0.4
6+
Stable tag: 3.0.5
77
License: Apache 2
88
License URI: http://www.apache.org/licenses/LICENSE-2.0
99

@@ -23,7 +23,8 @@ 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/3.0.4/docs/en/documentation.html).
26+
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.5
27+
/docs/en/documentation.html).
2728

2829
== Support ==
2930

@@ -56,8 +57,8 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/
5657
== Changelog ==
5758

5859

59-
= 3.0.4 - April 23 2024 =
60-
- [Hotfix] Restore version and tested against comments in base file
60+
= 3.0.5 - April 25 2024 =
61+
- [Bugfix] Notification message in admin panel is now truly dissmisable.
6162
- [Tested Against] PHP 8.2
6263
- [Tested Against] Wordpress 6.5
6364
- [Tested Against] Woocommerce 8.7.0

woocommerce-postfinancecheckout.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Plugin URI: https://wordpress.org/plugins/woo-postfinancecheckout
55
* Description: Process WooCommerce payments with PostFinance Checkout.
66
* License: Apache2
7-
* Version: 3.0.4
7+
* Version: 3.0.5
88
* License URI: http://www.apache.org/licenses/LICENSE-2.0
99
* Author: postfinancecheckout AG
1010
* Author URI: https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html
@@ -46,7 +46,7 @@ final class WooCommerce_PostFinanceCheckout {
4646
*
4747
* @var string
4848
*/
49-
private $version = '3.0.4';
49+
private $version = '3.0.5';
5050

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

0 commit comments

Comments
 (0)