Skip to content

Commit f98c263

Browse files
Release 3.3.6
1 parent 182721c commit f98c263

10 files changed

+31
-23
lines changed

README.md

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

1515
## Documentation
1616

17-
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.5/docs/en/documentation.html)
17+
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.6/docs/en/documentation.html)
1818

1919
## Support
2020

@@ -31,7 +31,7 @@ ____________________________________________________________________________
3131

3232
## License
3333

34-
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.3.5/LICENSE) for more information.
34+
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.3.6/LICENSE) for more information.
3535

3636
## Privacy Policy
3737

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -902,3 +902,6 @@ Please ensure that in woocommerce->settings->tax, the "Round tax at subtotal lev
902902
- [Tested Against] Woocommerce 9.7.0
903903
- [Tested Against] PHP SDK 4.6.0
904904

905+
= 3.3.6 - Mar 4 2025 =
906+
- [Bugfix] Correct default status for confirmed and fulfill
907+

docs/en/documentation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
2323
</a>
2424
</li>
2525
<li>
26-
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.3.5/">
26+
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.3.6/">
2727
Source
2828
</a>
2929
</li>

docs/en/resource/method.png

67.8 KB
Loading

docs/en/resource/settings.png

88.9 KB
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function get_default_settings() {
205205
$settings = array(
206206
array(
207207
'links' => array(
208-
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.5/docs/en/documentation.html' => esc_html__( 'Documentation', 'woo-postfinancecheckout' ),
208+
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.6/docs/en/documentation.html' => esc_html__( 'Documentation', 'woo-postfinancecheckout' ),
209209
'https://checkout.postfinance.ch/en-ch/user/signup' => esc_html__( 'Sign Up', 'woo-postfinancecheckout' ),
210210
),
211211
'type' => 'postfinancecheckout_links',

includes/class-wc-postfinancecheckout-migration.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class WC_PostFinanceCheckout_Migration {
5353
'1.0.6' => 'update_1_0_6_shorten_table_names',
5454
'1.0.7' => 'update_1_0_7_migrate_plugin_name_and_tables',
5555
'1.0.8' => 'update_1_0_8_store_default_status_mappings',
56+
'1.0.9' => 'update_1_0_9_restore_default_status_mappings',
5657
);
5758

5859
/**
@@ -267,7 +268,7 @@ public static function check_version() {
267268
public static function plugin_row_meta( $links, $file ) {
268269
if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) {
269270
$row_meta = array(
270-
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.5/docs/en/documentation.html" aria-label="' . esc_html__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
271+
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.6/docs/en/documentation.html" aria-label="' . esc_html__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
271272
);
272273

273274
return array_merge( $links, $row_meta );
@@ -754,6 +755,17 @@ public static function update_1_0_8_store_default_status_mappings() {
754755
$status_adapter = new WC_PostFinanceCheckout_Order_Status_Adapter();
755756
$status_adapter->store_default_status_mappings_on_database();
756757
}
758+
759+
760+
761+
/**
762+
* Store default order status mappings in the database during migration.
763+
* Ensures that the default order statuses are properly set.
764+
*/
765+
public static function update_1_0_9_restore_default_status_mappings() {
766+
$status_adapter = new WC_PostFinanceCheckout_Order_Status_Adapter();
767+
$status_adapter->store_default_status_mappings_on_database();
768+
}
757769
}
758770

759771
WC_PostFinanceCheckout_Migration::init();

includes/class-wc-postfinancecheckout-order-status-adapter.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,7 @@ public function store_default_status_mappings_on_database(): void
202202
$default_mappings = $this->get_default_status_mappings();
203203

204204
foreach ( $default_mappings as $key => $value ) {
205-
if ( get_option( self::POSTFINANCECHECKOUT_ORDER_STATUS_MAPPING_PREFIX . $key, false ) === false ) {
206-
update_option( self::POSTFINANCECHECKOUT_ORDER_STATUS_MAPPING_PREFIX . $key, $value );
207-
}
205+
$result = update_option( self::POSTFINANCECHECKOUT_ORDER_STATUS_MAPPING_PREFIX . $key, $value );
208206
}
209207
}
210208

@@ -226,10 +224,10 @@ public function store_default_status_mappings_on_database(): void
226224
* - postfinancecheckout_order_status_mapping_confirmed -> wc-on-hold -> OrderInternalStatus::ON_HOLD
227225
* - postfinancecheckout_order_status_mapping_processing -> wc-on-hold -> OrderInternalStatus::ON_HOLD
228226
* - postfinancecheckout_order_status_mapping_authorized -> wc-on-hold -> OrderInternalStatus::ON_HOLD
229-
* - postfinancecheckout_order_status_mapping_completed -> wc-processing -> OrderInternalStatus::PROCESSING
227+
* - postfinancecheckout_order_status_mapping_completed -> wc-on-hold -> OrderInternalStatus::ON_HOLD
230228
* - postfinancecheckout_order_status_mapping_failed -> wc-failed -> OrderInternalStatus::FAILED
231229
* - postfinancecheckout_order_status_mapping_voided -> wc-cancelled or 'wc-refunded' -> OrderInternalStatus::CANCELLED
232-
* - postfinancecheckout_order_status_mapping_fulfill -> wc-completed -> OrderInternalStatus::COMPLETED
230+
* - postfinancecheckout_order_status_mapping_fulfill -> wc-processing -> OrderInternalStatus::PROCESSING
233231
*
234232
* These defaults are used if no custom mappings are provided by the user.
235233
*
@@ -242,10 +240,10 @@ public function get_default_status_mappings() : array
242240
self::POSTFINANCECHECKOUT_STATUS_CONFIRMED => 'wc-on-hold',
243241
self::POSTFINANCECHECKOUT_STATUS_PROCESSING => 'wc-on-hold',
244242
self::POSTFINANCECHECKOUT_STATUS_AUTHORIZED => 'wc-on-hold',
245-
self::POSTFINANCECHECKOUT_STATUS_COMPLETED => 'wc-processing',
243+
self::POSTFINANCECHECKOUT_STATUS_COMPLETED => 'wc-postfi-waiting',
246244
self::POSTFINANCECHECKOUT_STATUS_FAILED => 'wc-failed',
247245
self::POSTFINANCECHECKOUT_STATUS_VOIDED => 'wc-cancelled',
248-
self::POSTFINANCECHECKOUT_STATUS_FULFILL => 'wc-completed',
246+
self::POSTFINANCECHECKOUT_STATUS_FULFILL => 'wc-processing',
249247
self::POSTFINANCECHECKOUT_STATUS_DECLINE => 'wc-cancelled',
250248
);
251249
}

readme.txt

Lines changed: 4 additions & 9 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.7
6-
Stable tag: 3.3.5
6+
Stable tag: 3.3.6
77
License: Apache-2.0
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/3.3.5/docs/en/documentation.html).
26+
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.3.6/docs/en/documentation.html).
2727

2828
== External Services ==
2929

@@ -81,10 +81,5 @@ Enquiries about our terms of use can be made on the [PostFinance Checkout terms
8181
== Changelog ==
8282

8383

84-
= 3.3.5 - Mar 4 2025 =
85-
- [Feature] Status mapping feature introduced
86-
- [Bugfix] Fixed discount rate and amount calculation
87-
- [Tested Against] PHP 8.2
88-
- [Tested Against] Wordpress 6.7
89-
- [Tested Against] Woocommerce 9.7.0
90-
- [Tested Against] PHP SDK 4.6.0
84+
= 3.3.6 - Mar 4 2025 =
85+
- [Bugfix] Correct default status for confirmed and fulfill

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-postfinance-checkout
55
* Description: Process WooCommerce payments with PostFinance Checkout.
6-
* Version: 3.3.5
6+
* Version: 3.3.6
77
* Author: postfinancecheckout AG
88
* Author URI: https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html
99
* Text Domain: postfinancecheckout
@@ -46,7 +46,7 @@ final class WooCommerce_PostFinanceCheckout {
4646
*
4747
* @var string
4848
*/
49-
private $version = '3.3.5';
49+
private $version = '3.3.6';
5050

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

0 commit comments

Comments
 (0)