Skip to content

Commit 8a72368

Browse files
Release v4.0.2
1 parent c0bf7e1 commit 8a72368

File tree

8 files changed

+198
-223
lines changed

8 files changed

+198
-223
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.2](https://github.com/aplazame/woocommerce/tree/v4.0.2) (2024-05-30)
4+
5+
* Beta support for Checkout Block.
6+
37
#### [v4.0.1](https://github.com/aplazame/woocommerce/tree/v4.0.1) (2024-03-05)
48

59
* Order confirmation process improved.

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

77
clean:

plugin/README.txt

Lines changed: 2 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.4.3
5+
Tested up to: 6.5.3
66
Requires PHP: 5.3.0
7-
Stable tag: 4.0.1
7+
Stable tag: 4.0.2
88
License: BSD-3-Clause
99
License URI: https://github.com/aplazame/woocommerce/blob/master/LICENSE
1010

plugin/aplazame.php

Lines changed: 10 additions & 10 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.1
5+
* Version: 4.0.2
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: 3.0.0
14-
* WC tested up to: 8.6.1
14+
* WC tested up to: 8.9.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 = '4.0.1';
28+
const VERSION = '4.0.2';
2929
const METHOD_ID = 'aplazame';
3030
const METHOD_TITLE = 'Aplazame';
3131

@@ -165,11 +165,11 @@ public function __construct( $apiBaseUri ) {
165165
add_action( 'woocommerce_api_aplazame', array( $this, 'api_router' ) );
166166

167167
// Cart and Checkout Blocks
168-
add_action( 'woocommerce_blocks_loaded', array( $this, 'add_gateway_block') );
168+
add_action( 'woocommerce_blocks_loaded', array( $this, 'add_gateway_block' ) );
169169
add_action(
170170
'before_woocommerce_init',
171-
function() {
172-
if ( class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil') ) {
171+
function () {
172+
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
173173
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
174174
}
175175
}
@@ -179,7 +179,7 @@ function() {
179179
add_action(
180180
'before_woocommerce_init',
181181
function () {
182-
if ( class_exists('\Automattic\WooCommerce\Utilities\FeaturesUtil') ) {
182+
if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
183183
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
184184
}
185185
}
@@ -288,15 +288,15 @@ public function add_gateway( $methods ) {
288288
}
289289

290290
public function add_gateway_block() {
291-
if( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
291+
if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Payments\Integrations\AbstractPaymentMethodType' ) ) {
292292
return;
293293
}
294294

295295
include_once 'classes/wc-aplazame-gateway-block.php';
296296
add_action(
297297
'woocommerce_blocks_payment_method_type_registration',
298-
function( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) {
299-
$payment_method_registry->register( new WC_Aplazame_Gateway_Blocks_Support );
298+
function ( Automattic\WooCommerce\Blocks\Payments\PaymentMethodRegistry $payment_method_registry ) {
299+
$payment_method_registry->register( new WC_Aplazame_Gateway_Blocks_Support() );
300300
}
301301
);
302302
}

plugin/classes/wc-aplazame-gateway-block.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ final class WC_Aplazame_Gateway_Blocks_Support extends AbstractPaymentMethodType
1111
protected $name = WC_Aplazame::METHOD_ID;
1212

1313
public function initialize() {
14-
$this->settings = get_option( "woocommerce_{$this->name}_settings", [] );
15-
$gateways = WC()->payment_gateways->payment_gateways();
14+
$this->settings = get_option( "woocommerce_{$this->name}_settings", array() );
15+
$gateways = WC()->payment_gateways->payment_gateways();
1616
$this->gateway = $gateways[ $this->name ];
1717
}
1818

@@ -24,10 +24,10 @@ public function get_payment_method_script_handles() {
2424
$asset_path = plugin_dir_path( __FILE__ ) . '../resources/payment-block.asset.php';
2525
$version = null;
2626
$dependencies = array();
27-
if( file_exists( $asset_path ) ) {
27+
if ( file_exists( $asset_path ) ) {
2828
$asset = require $asset_path;
29-
$version = isset( $asset[ 'version' ] ) ? $asset[ 'version' ] : $version;
30-
$dependencies = isset( $asset[ 'dependencies' ] ) ? $asset[ 'dependencies' ] : $dependencies;
29+
$version = isset( $asset['version'] ) ? $asset['version'] : $version;
30+
$dependencies = isset( $asset['dependencies'] ) ? $asset['dependencies'] : $dependencies;
3131
}
3232
wp_register_script(
3333
'wc-aplazame-blocks-integration',
@@ -36,13 +36,13 @@ public function get_payment_method_script_handles() {
3636
$version,
3737
true
3838
);
39-
return [ 'wc-aplazame-blocks-integration' ];
39+
return array( 'wc-aplazame-blocks-integration' );
4040
}
4141

4242
public function get_payment_method_data() {
43-
return [
44-
'title' => $this->gateway->title,
45-
'description' => $this->gateway->settings['description'],
46-
];
43+
return array(
44+
'title' => $this->gateway->title,
45+
'description' => $this->gateway->settings['description'],
46+
);
4747
}
4848
}

0 commit comments

Comments
 (0)