Skip to content

Commit d315984

Browse files
Release v4.0.1
* Order confirmation process improved.
2 parents b89f27a + 0e067ab commit d315984

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Change Log
22

3+
#### [v4.0.1](https://github.com/aplazame/woocommerce/tree/v4.0.1) (2024-03-05)
4+
5+
* Order confirmation process improved.
6+
37
#### [v4.0.0](https://github.com/aplazame/woocommerce/tree/v4.0.0) (2024-02-26)
48

59
* [ADD] Checkout v4 as primary version.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugin_path ?= plugin
22
i18n_path ?= i18n/languages
33
i18n_name ?= aplazame-es_ES
4-
version ?= v4.0.0
4+
version ?= v4.0.1
55
errors = $(shell find . -type f -name "*.php" -exec php -l "{}" \;| grep "Errors parsing ";)
66

77
clean:

plugin/README.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,f
44
Requires at least: 4.0.1
55
Tested up to: 6.4.3
66
Requires PHP: 5.3.0
7-
Stable tag: 3.9.0
7+
Stable tag: 4.0.1
88
License: BSD-3-Clause
99
License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE
1010

@@ -77,6 +77,10 @@ Of course, simply select an *"Aplazame refund"* in the product detail.
7777

7878
== Changelog ==
7979

80+
#### [v4.0.1](https://github.com/aplazame/woocommerce/tree/v4.0.1) (2024-03-05)
81+
82+
* Order confirmation process improved.
83+
8084
#### [v4.0.0](https://github.com/aplazame/woocommerce/tree/v4.0.0) (2024-02-26)
8185

8286
* [ADD] Checkout v4 as primary version.

plugin/aplazame.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* Plugin Name: Aplazame
44
* Plugin URI: https://github.com/aplazame/woocommerce
5-
* Version: 4.0.0
5+
* Version: 4.0.1
66
* Description: Aplazame offers a payment method to receive funding for the purchases.
77
* Author: Aplazame
88
* Author URI: https://aplazame.com
@@ -25,7 +25,7 @@
2525
require_once 'lib/Aplazame/Aplazame/autoload.php';
2626

2727
class WC_Aplazame {
28-
const VERSION = '4.0.0';
28+
const VERSION = '4.0.1';
2929
const METHOD_ID = 'aplazame';
3030
const METHOD_TITLE = 'Aplazame';
3131

plugin/classes/api/Aplazame_Api_ConfirmController.php

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,17 @@ public function confirm( $payload ) {
5252
}
5353

5454
switch ( $payload['status'] ) {
55-
case 'pending':
56-
switch ( $payload['status_reason'] ) {
57-
case 'confirmation_required':
58-
if ( method_exists( $order, 'payment_complete' ) ) {
59-
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
60-
$order->payment_complete();
61-
break;
62-
}
63-
if ( ! $order->payment_complete() ) {
64-
return self::ko( "'payment_complete' function failed" );
65-
}
66-
} else {
67-
$order->update_status( 'processing', sprintf( __( 'Confirmed', 'aplazame' ) ) );
68-
}
55+
case 'ok':
56+
if ( method_exists( $order, 'payment_complete' ) ) {
57+
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
58+
$order->payment_complete();
6959
break;
60+
}
61+
if ( ! $order->payment_complete() ) {
62+
return self::ko( "'payment_complete' function failed" );
63+
}
64+
} else {
65+
$order->update_status( 'processing', sprintf( __( 'Confirmed', 'aplazame' ) ) );
7066
}
7167
break;
7268
case 'ko':

0 commit comments

Comments
 (0)