Skip to content

Commit 964c9a2

Browse files
Release v3.6.3
2 parents cfddeb9 + 3bf4010 commit 964c9a2

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
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+
#### [v3.6.3](https://github.com/aplazame/woocommerce/tree/v3.6.3) (2022-10-25)
4+
5+
* [CHANGE] Checkout header.
6+
37
#### [v3.6.2](https://github.com/aplazame/woocommerce/tree/v3.6.2) (2022-06-20)
48

59
* Release for wordpress.org.

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 ?= v3.6.2
4+
version ?= v3.6.3
55
errors = $(shell find . -type f -name "*.php" -exec php -l "{}" \;| grep "Errors parsing ";)
66

77
clean:

plugin/README.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Contributors: aplazame
33
Tags: aplazame,woocommerce,ecommerce,payment,checkout,credit,aplazar,financiar,financiera,financiación,pago aplazado,método de pago
44
Requires at least: 4.0.1
5-
Tested up to: 6.0.0
5+
Tested up to: 6.0.3
66
Requires PHP: 5.3.0
7-
Stable tag: 3.6.2
7+
Stable tag: 3.6.3
88
License: BSD-3-Clause
99
License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE
1010

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

7878
== Changelog ==
7979

80+
#### [v3.6.3](https://github.com/aplazame/woocommerce/tree/v3.6.3) (2022-10-25)
81+
82+
* [CHANGE] Checkout header.
83+
84+
#### [v3.6.2](https://github.com/aplazame/woocommerce/tree/v3.6.2) (2022-06-20)
85+
86+
* Release for wordpress.org.
87+
8088
#### [v3.6.1](https://github.com/aplazame/woocommerce/tree/v3.6.1) (2022-06-20)
8189

8290
* [ADD] Show/hide alternative widget option.

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: 3.6.2
5+
* Version: 3.6.3
66
* Description: Aplazame offers a payment method to receive funding for the purchases.
77
* Author: Aplazame
88
* Author URI: https://aplazame.com
@@ -11,7 +11,7 @@
1111
* Domain Path: /i18n/languages/
1212
*
1313
* WC requires at least: 2.3
14-
* WC tested up to: 6.6.0
14+
* WC tested up to: 7.0.0
1515
*
1616
* License: GNU General Public License v3.0
1717
* License URI: http://www.gnu.org/licenses/gpl-3.0.html

plugin/classes/sdk/Client.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function refund( $order_id, $amount ) {
7979
* @throws Aplazame_Sdk_Api_ApiServerException if request is invalid.
8080
*/
8181
public function create_checkout( $payload ) {
82-
return $this->request( 'POST', '/checkout', $payload );
82+
return $this->request( 'POST', '/checkout', $payload, 3 );
8383
}
8484

8585
/**
@@ -104,6 +104,7 @@ public function fetch( $order_id ) {
104104
* @param string $method The HTTP method of the request.
105105
* @param string $path The path of the request.
106106
* @param array|null $data The data of the request.
107+
* @param int $apiVersion The API version of the request.
107108
*
108109
* @return array The data of the response.
109110
*
@@ -112,9 +113,9 @@ public function fetch( $order_id ) {
112113
* @throws Aplazame_Sdk_Api_ApiClientException if an I/O error occurs.
113114
* @throws Aplazame_Sdk_Api_ApiServerException if request is invalid.
114115
*/
115-
public function request( $method, $path, $data = null ) {
116+
public function request( $method, $path, $data = null, $apiVersion = 1 ) {
116117
try {
117-
return $this->apiClient->request( $method, $path, $data );
118+
return $this->apiClient->request( $method, $path, $data, $apiVersion );
118119
} catch ( Aplazame_Sdk_Api_ApiClientException $e ) {
119120
$details = json_encode( $e->getError() );
120121

plugin/i18n/languages/aplazame.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: Aplazame v3.6.2\n"
9+
"Project-Id-Version: Aplazame v3.6.3\n"
1010
"Report-Msgid-Bugs-To: https://github.com/aplazame/woocommerce\n"
11-
"POT-Creation-Date: 2022-06-20 12:15+0000\n"
11+
"POT-Creation-Date: 2022-10-25 09:48+0000\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: https://github.com/aplazame/woocommerce\n"

plugin/lib/Aplazame/Sdk/Api/ApiRequest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ public static function createAcceptHeader( $useSandbox, $apiVersion, $format ) {
3838
/**
3939
*
4040
* @param bool $useSandbox
41+
* @param int $apiVersion The API version of the request.
4142
* @param string $accessToken The Access Token of the request (Public API key or Private API key)
4243
* @param string $method The HTTP method of the request.
4344
* @param string $uri The URI of the request.
4445
* @param mixed $data The data of the request.
4546
*/
4647
public function __construct(
4748
$useSandbox,
49+
$apiVersion,
4850
$accessToken,
4951
$method,
5052
$uri,
@@ -53,7 +55,7 @@ public function __construct(
5355
global $wp_version;
5456

5557
$headers = array(
56-
'Accept' => array( self::createAcceptHeader( $useSandbox, 1, self::FORMAT_JSON ) ),
58+
'Accept' => array( self::createAcceptHeader( $useSandbox, $apiVersion, self::FORMAT_JSON ) ),
5759
'Authorization' => array( self::createAuthorizationHeader( $accessToken ) ),
5860
'User-Agent' => array(
5961
'Sdk/' . self::SDK_VERSION,

plugin/lib/Aplazame/Sdk/Api/Client.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ public function put( $path, array $data ) {
146146
* @param string $method The HTTP method of the request.
147147
* @param string $path The path of the request.
148148
* @param array|null $data The data of the request.
149+
* @param int $apiVersion The API version of the request.
149150
*
150151
* @return array The data of the response.
151152
*
@@ -154,10 +155,10 @@ public function put( $path, array $data ) {
154155
* @throws Aplazame_Sdk_Api_ApiClientException if an I/O error occurs.
155156
* @throws Aplazame_Sdk_Api_ApiServerException if request is invalid.
156157
*/
157-
public function request( $method, $path, $data = null ) {
158+
public function request( $method, $path, $data = null, $apiVersion = 1 ) {
158159
$uri = $this->apiBaseUri . '/' . ltrim( $path, '/' );
159160

160-
$request = new Aplazame_Sdk_Api_ApiRequest( $this->useSandbox, $this->accessToken, $method, $uri, $data );
161+
$request = new Aplazame_Sdk_Api_ApiRequest( $this->useSandbox, $apiVersion, $this->accessToken, $method, $uri, $data );
161162
try {
162163
$response = $this->httpClient->send( $request );
163164
} catch ( RuntimeException $e ) {

0 commit comments

Comments
 (0)