Skip to content

Commit 9df0d9e

Browse files
Release v3.9.0
* [ADD] HPOS compatibility. * [FIX] Code deprecations, now requires WC 3.0.0+.
1 parent 45422ef commit 9df0d9e

File tree

13 files changed

+53
-74
lines changed

13 files changed

+53
-74
lines changed

HISTORY.md

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

3+
#### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23)
4+
5+
* [ADD] HPOS compatibility.
6+
* [FIX] Code deprecations, now requires WC 3.0.0+.
7+
38
#### [v3.8.4](https://github.com/aplazame/woocommerce/tree/v3.8.4) (2023-12-05)
49

510
* [ADD] Developer options for checkout v4 API tests.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2023, Aplazame
3+
Copyright (c) 2024, Aplazame
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

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

77
clean:

plugin/LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652652
If the program does terminal interaction, make it output a short
653653
notice like this when it starts in an interactive mode:
654654

655-
aplazame.js Copyright (C) 2015 Aplazame S.L.
655+
aplazame.js Copyright (C) 2024 Aplazame S.L.
656656
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657657
This is free software, and you are welcome to redistribute it
658658
under certain conditions; type `show c' for details.

plugin/README.txt

Lines changed: 8 additions & 3 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.2.2
5+
Tested up to: 6.4.2
66
Requires PHP: 5.3.0
7-
Stable tag: 3.8.4
7+
Stable tag: 3.9.0
88
License: BSD-3-Clause
99
License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE
1010

@@ -39,7 +39,7 @@ At this moment our service only use Euros.
3939

4040
= Requirements =
4141

42-
*WooCommerce 2.3 or higher*
42+
*WooCommerce 3.0.0 or higher*
4343

4444
= Quick install =
4545

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

7878
== Changelog ==
7979

80+
#### [v3.9.0](https://github.com/aplazame/woocommerce/tree/v3.9.0) (2024-01-23)
81+
82+
* [ADD] HPOS compatibility.
83+
* [FIX] Code deprecations, now requires WC 3.0.0+.
84+
8085
#### [v3.8.4](https://github.com/aplazame/woocommerce/tree/v3.8.4) (2023-12-05)
8186

8287
* [ADD] Developer options for checkout v4 API tests.

plugin/aplazame.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
/*
33
* Plugin Name: Aplazame
44
* Plugin URI: https://github.com/aplazame/woocommerce
5-
* Version: 3.8.4
5+
* Version: 3.9.0
66
* Description: Aplazame offers a payment method to receive funding for the purchases.
77
* Author: Aplazame
88
* Author URI: https://aplazame.com
99
*
1010
* Text Domain: aplazame
1111
* Domain Path: /i18n/languages/
1212
*
13-
* WC requires at least: 2.3
14-
* WC tested up to: 7.9.0
13+
* WC requires at least: 3.0.0
14+
* WC tested up to: 8.5.1
1515
*
1616
* License: GNU General Public License v3.0
1717
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -25,7 +25,7 @@
2525
require_once 'lib/Aplazame/Aplazame/autoload.php';
2626

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

@@ -163,6 +163,16 @@ public function __construct( $apiBaseUri ) {
163163
add_action( 'woocommerce_order_status_completed', array( $this, 'capture_order' ) );
164164

165165
add_action( 'woocommerce_api_aplazame', array( $this, 'api_router' ) );
166+
167+
// Declare HPOS compatibility
168+
add_action(
169+
'before_woocommerce_init',
170+
function () {
171+
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
172+
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
173+
}
174+
}
175+
);
166176
}
167177

168178
public function aplazame_campaigns_tab( $tabs ) {

plugin/classes/api/Aplazame_Api_ArticleController.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

plugin/classes/api/Aplazame_Api_OrderController.php

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,14 @@ public function history( array $params ) {
1313

1414
/**
1515
*
16-
* @var WP_Post[] $wcOrders
16+
* @var WC_Order_Query[] $wcOrders
1717
*/
1818
$billing_email = WC_Aplazame::_m_or_a( $order, 'get_billing_email', 'billing_email' );
19-
if ( function_exists( 'wc_get_orders' ) ) {
20-
$wcOrders = wc_get_orders(
21-
array(
22-
'billing_email' => $billing_email,
23-
)
24-
);
25-
} else {
26-
$wcOrders = get_posts(
27-
array(
28-
'meta_key' => '_billing_email',
29-
'meta_value' => $billing_email,
30-
'post_type' => 'shop_order',
31-
)
32-
);
33-
}
19+
$wcOrders = wc_get_orders(
20+
array(
21+
'billing_email' => $billing_email,
22+
)
23+
);
3424

3525
$historyOrders = array();
3626

plugin/classes/api/Aplazame_Api_Router.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ public function route( $path, array $queryArguments, $payload ) {
106106
}
107107

108108
switch ( $path ) {
109-
case '/article/':
110-
include_once 'Aplazame_Api_ArticleController.php';
111-
$controller = new Aplazame_Api_ArticleController();
112-
113-
return $controller->articles( $queryArguments );
114109
case '/confirm/':
115110
include_once 'Aplazame_Api_ConfirmController.php';
116111
$controller = new Aplazame_Api_ConfirmController( $this->sandbox );

plugin/i18n/languages/aplazame.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
msgid ""
22
msgstr ""
33
"Report-Msgid-Bugs-To: https://github.com/aplazame/woocommerce\n"
4-
"POT-Creation-Date: 2023-12-05 13:38+0100\n"
4+
"POT-Creation-Date: 2024-01-23 10:27+0100\n"
55
"Language: es_ES\n"
66
"MIME-Version: 1.0\n"
77
"Content-Type: text/plain; charset=UTF-8\n"
@@ -365,10 +365,10 @@ msgstr "Confirmada"
365365
msgid "The campaign applies to all products from your catalogue"
366366
msgstr "La campaña aplica a todo el catálogo de productos."
367367

368-
#: aplazame.php:170
368+
#: aplazame.php:180
369369
msgid "Aplazame Campaigns"
370370
msgstr "Campañas Aplazame"
371371

372-
#: aplazame.php:225
372+
#: aplazame.php:235
373373
msgid "Settings"
374374
msgstr "Ajustes"

0 commit comments

Comments
 (0)