Skip to content

Commit f68f290

Browse files
Release v4.1.0
* [ADD] Widget v5.
2 parents 05a9dc6 + 9c6432f commit f68f290

File tree

10 files changed

+381
-223
lines changed

10 files changed

+381
-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.1.0](https://github.com/aplazame/woocommerce/tree/v4.1.0) (2024-09-12)
4+
5+
* [ADD] Widget v5.
6+
37
#### [v4.0.2](https://github.com/aplazame/woocommerce/tree/v4.0.2) (2024-05-30)
48

59
* Beta support for Checkout Block.

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.2
4+
version ?= v4.1.0
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.5.3
5+
Tested up to: 6.6.2
66
Requires PHP: 5.3.0
7-
Stable tag: 4.0.2
7+
Stable tag: 4.1.0
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+
#### [v4.1.0](https://github.com/aplazame/woocommerce/tree/v4.1.0) (2024-09-12)
81+
82+
* [ADD] Widget v5.
83+
84+
#### [v4.0.2](https://github.com/aplazame/woocommerce/tree/v4.0.2) (2024-05-30)
85+
86+
* Beta support for Checkout Block.
87+
8088
#### [v4.0.1](https://github.com/aplazame/woocommerce/tree/v4.0.1) (2024-03-05)
8189

8290
* Order confirmation process improved.

plugin/aplazame.php

Lines changed: 9 additions & 7 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.2
5+
* Version: 4.1.0
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.9.1
14+
* WC tested up to: 9.2.3
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.2';
28+
const VERSION = '4.1.0';
2929
const METHOD_ID = 'aplazame';
3030
const METHOD_TITLE = 'Aplazame';
3131

@@ -371,7 +371,6 @@ class WC_Aplazame_Install {
371371
'cart_widget_primary_color' => '#334bff',
372372
'product_widget_layout' => 'horizontal',
373373
'cart_widget_layout' => 'horizontal',
374-
'widget_legacy' => 'no',
375374
'product_widget_border' => 'yes',
376375
'product_widget_align' => 'center',
377376
'cart_widget_align' => 'center',
@@ -382,6 +381,12 @@ class WC_Aplazame_Install {
382381
'cart_downpayment_info' => 'yes',
383382
'product_widget_max_desired' => 'no',
384383
'cart_widget_max_desired' => 'no',
384+
'product_widget_ver' => 'v5',
385+
'cart_widget_ver' => 'v5',
386+
'product_slider' => 'yes',
387+
'cart_slider' => 'yes',
388+
'product_small_size' => 'no',
389+
'cart_small_size' => 'no',
385390
);
386391

387392
public static function upgrade() {
@@ -410,9 +415,6 @@ public static function upgrade() {
410415
if ( isset( $aplazame->settings['title_instalments'] ) ) {
411416
$aplazame->settings['title'] = $aplazame->settings['title_instalments'];
412417
}
413-
if ( ! isset( $aplazame->settings['widget_legacy'] ) ) {
414-
$aplazame->settings['widget_legacy'] = 'yes';
415-
}
416418
self::save_settings( $aplazame->settings );
417419

418420
self::update_aplazame_version();

plugin/classes/wc-aplazame-gateway.php

Lines changed: 71 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,6 @@ public function init_form_fields() {
232232
),
233233
'default' => WC_Aplazame_Install::$defaultSettings['widget_out_of_limits'],
234234
),
235-
'widget_legacy' => array(
236-
'type' => 'checkbox',
237-
'title' => 'Widget legacy',
238-
'description' => __( 'Use widget legacy instead new widget', 'aplazame' ),
239-
'label' => __( 'Turn on widget legacy', 'aplazame' ),
240-
),
241235
'payment_section' => array(
242236
'title' => __( 'Payment method title and description', 'aplazame' ),
243237
'type' => 'title',
@@ -266,6 +260,17 @@ public function init_form_fields() {
266260
'type' => 'title',
267261
'description' => '',
268262
),
263+
'product_widget_ver' => array(
264+
'type' => 'select',
265+
'title' => __( 'Widget version', 'aplazame' ),
266+
'description' => __( 'Select your desired version for product widget', 'aplazame' ),
267+
'options' => array(
268+
'v3' => __( 'v3', 'aplazame' ),
269+
'v4' => __( 'v4', 'aplazame' ),
270+
'v5' => __( 'v5', 'aplazame' ),
271+
),
272+
'default' => 'v5',
273+
),
269274
'product_widget_action' => array(
270275
'type' => 'select',
271276
'title' => __( 'Place to show', 'aplazame' ),
@@ -285,6 +290,18 @@ public function init_form_fields() {
285290
'description' => __( 'Number of default instalments in product widget', 'aplazame' ),
286291
'placeholder' => __( 'Optional (only numbers)', 'aplazame' ),
287292
),
293+
'product_slider' => array(
294+
'type' => 'checkbox',
295+
'title' => __( 'Slider', 'aplazame' ),
296+
'description' => __( 'Show slider in product widget (only v5)', 'aplazame' ),
297+
'label' => __( 'Show slider info', 'aplazame' ),
298+
),
299+
'product_small_size' => array(
300+
'type' => 'checkbox',
301+
'title' => __( 'Small size', 'aplazame' ),
302+
'description' => __( 'Reduce size of product widget (only v5)', 'aplazame' ),
303+
'label' => __( 'Reduce size', 'aplazame' ),
304+
),
288305
'product_downpayment_info' => array(
289306
'type' => 'checkbox',
290307
'title' => __( 'Downpayment info', 'aplazame' ),
@@ -306,28 +323,19 @@ public function init_form_fields() {
306323
'product_widget_border' => array(
307324
'type' => 'checkbox',
308325
'title' => __( 'Border', 'aplazame' ),
309-
'description' => __( 'Show border in product widget (only new widget)', 'aplazame' ),
326+
'description' => __( 'Show border in product widget (only v4)', 'aplazame' ),
310327
'label' => __( 'Show border', 'aplazame' ),
311328
),
312329
'product_widget_max_desired' => array(
313330
'type' => 'checkbox',
314331
'title' => __( 'Enter maximum instalment', 'aplazame' ),
315-
'description' => __( 'Allow the user to manually enter the maximum instalment they want to pay (only new widget)', 'aplazame' ),
332+
'description' => __( 'Allow the user to manually enter the maximum instalment they want to pay (only v4)', 'aplazame' ),
316333
'label' => __( 'Allow the user to manually enter the maximum instalment', 'aplazame' ),
317334
),
318-
'product_widget_primary_color' => array(
319-
'type' => 'text',
320-
'css' => 'width:100px;',
321-
'class' => 'colorpick',
322-
'title' => __( 'Primary color', 'aplazame' ),
323-
'description' => __( 'Primary color hexadecimal code for product widget (only new widget)', 'aplazame' ),
324-
'default' => WC_Aplazame_Install::$defaultSettings['product_widget_primary_color'],
325-
'placeholder' => WC_Aplazame_Install::$defaultSettings['product_widget_primary_color'],
326-
),
327335
'product_widget_layout' => array(
328336
'type' => 'select',
329337
'title' => __( 'Layout', 'aplazame' ),
330-
'description' => __( 'Layout of product widget (only new widget)', 'aplazame' ),
338+
'description' => __( 'Layout of product widget (only v4)', 'aplazame' ),
331339
'options' => array(
332340
'horizontal' => 'Horizontal',
333341
'vertical' => 'Vertical',
@@ -337,14 +345,23 @@ public function init_form_fields() {
337345
'product_widget_align' => array(
338346
'type' => 'select',
339347
'title' => __( 'Alignment', 'aplazame' ),
340-
'description' => __( 'Product widget alignment (only new widget)', 'aplazame' ),
348+
'description' => __( 'Product widget alignment (only v4/v5)', 'aplazame' ),
341349
'options' => array(
342350
'left' => __( 'Left', 'aplazame' ),
343351
'center' => __( 'Center', 'aplazame' ),
344352
'right' => __( 'Right', 'aplazame' ),
345353
),
346354
'default' => WC_Aplazame_Install::$defaultSettings['product_widget_align'],
347355
),
356+
'product_widget_primary_color' => array(
357+
'type' => 'text',
358+
'css' => 'width:100px;',
359+
'class' => 'colorpick',
360+
'title' => __( 'Primary color', 'aplazame' ),
361+
'description' => __( 'Primary color hexadecimal code for product widget (only v4)', 'aplazame' ),
362+
'default' => WC_Aplazame_Install::$defaultSettings['product_widget_primary_color'],
363+
'placeholder' => WC_Aplazame_Install::$defaultSettings['product_widget_primary_color'],
364+
),
348365
'quantity_selector' => array(
349366
'type' => 'text',
350367
'title' => __( 'Product quantity CSS selector', 'aplazame' ),
@@ -374,6 +391,17 @@ public function init_form_fields() {
374391
'type' => 'title',
375392
'description' => '',
376393
),
394+
'cart_widget_ver' => array(
395+
'type' => 'select',
396+
'title' => __( 'Widget version', 'aplazame' ),
397+
'description' => __( 'Select your desired version for cart widget', 'aplazame' ),
398+
'options' => array(
399+
'v3' => __( 'v3', 'aplazame' ),
400+
'v4' => __( 'v4', 'aplazame' ),
401+
'v5' => __( 'v5', 'aplazame' ),
402+
),
403+
'default' => 'v5',
404+
),
377405
'cart_widget_action' => array(
378406
'type' => 'select',
379407
'title' => __( 'Place to show', 'aplazame' ),
@@ -392,6 +420,18 @@ public function init_form_fields() {
392420
'description' => __( 'Number of default instalments in cart widget', 'aplazame' ),
393421
'placeholder' => __( 'Optional (only numbers)', 'aplazame' ),
394422
),
423+
'cart_slider' => array(
424+
'type' => 'checkbox',
425+
'title' => __( 'Slider', 'aplazame' ),
426+
'description' => __( 'Show slider in cart widget (only v5)', 'aplazame' ),
427+
'label' => __( 'Show slider info', 'aplazame' ),
428+
),
429+
'cart_small_size' => array(
430+
'type' => 'checkbox',
431+
'title' => __( 'Small size', 'aplazame' ),
432+
'description' => __( 'Reduce size of cart widget (only v5)', 'aplazame' ),
433+
'label' => __( 'Reduce size', 'aplazame' ),
434+
),
395435
'cart_downpayment_info' => array(
396436
'type' => 'checkbox',
397437
'title' => __( 'Downpayment info', 'aplazame' ),
@@ -413,22 +453,13 @@ public function init_form_fields() {
413453
'cart_widget_max_desired' => array(
414454
'type' => 'checkbox',
415455
'title' => __( 'Enter maximum instalment', 'aplazame' ),
416-
'description' => __( 'Allow the user to manually enter the maximum instalment they want to pay (only new widget)', 'aplazame' ),
456+
'description' => __( 'Allow the user to manually enter the maximum instalment they want to pay (only v4)', 'aplazame' ),
417457
'label' => __( 'Allow the user to manually enter the maximum instalment', 'aplazame' ),
418458
),
419-
'cart_widget_primary_color' => array(
420-
'type' => 'text',
421-
'css' => 'width:100px;',
422-
'class' => 'colorpick',
423-
'title' => __( 'Primary color', 'aplazame' ),
424-
'description' => __( 'Primary color hexadecimal code for cart widget (only new widget)', 'aplazame' ),
425-
'default' => WC_Aplazame_Install::$defaultSettings['cart_widget_primary_color'],
426-
'placeholder' => WC_Aplazame_Install::$defaultSettings['cart_widget_primary_color'],
427-
),
428459
'cart_widget_layout' => array(
429460
'type' => 'select',
430461
'title' => __( 'Layout', 'aplazame' ),
431-
'description' => __( 'Layout of cart widget (only new widget)', 'aplazame' ),
462+
'description' => __( 'Layout of cart widget (only v4)', 'aplazame' ),
432463
'options' => array(
433464
'horizontal' => 'Horizontal',
434465
'vertical' => 'Vertical',
@@ -438,14 +469,23 @@ public function init_form_fields() {
438469
'cart_widget_align' => array(
439470
'type' => 'select',
440471
'title' => __( 'Alignment', 'aplazame' ),
441-
'description' => __( 'Cart widget alignment (only new widget)', 'aplazame' ),
472+
'description' => __( 'Cart widget alignment (only v4/v5)', 'aplazame' ),
442473
'options' => array(
443474
'left' => __( 'Left', 'aplazame' ),
444475
'center' => __( 'Center', 'aplazame' ),
445476
'right' => __( 'Right', 'aplazame' ),
446477
),
447478
'default' => WC_Aplazame_Install::$defaultSettings['cart_widget_align'],
448479
),
480+
'cart_widget_primary_color' => array(
481+
'type' => 'text',
482+
'css' => 'width:100px;',
483+
'class' => 'colorpick',
484+
'title' => __( 'Primary color', 'aplazame' ),
485+
'description' => __( 'Primary color hexadecimal code for cart widget (only v4)', 'aplazame' ),
486+
'default' => WC_Aplazame_Install::$defaultSettings['cart_widget_primary_color'],
487+
'placeholder' => WC_Aplazame_Install::$defaultSettings['cart_widget_primary_color'],
488+
),
449489

450490
// Button settings
451491
'button_section' => array(
698 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)