Skip to content

Commit

Permalink
release/v1.4.0 (#67)
Browse files Browse the repository at this point in the history
* chore: bump version to 1.4.0

* chore: update readme and changelog

* fix: add existence verification for tax elements

---------

Co-authored-by: Thrashattack <henrique202@gmail.com>
  • Loading branch information
Thrashattack and Thrashattack authored Nov 26, 2024
1 parent ea9f025 commit 0b7d330
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
== FLIZpay for WooCommerce Changelog ==

2024-25-11 - version 1.4.0
* Use admin user language on admin page prior to general language settings and add customer info to transaction
* Value with cashback applied is now displayed on the checkout page

2024-29-10 - version 1.3.0
* Remove the payment failed page in favor of FLIZ payment failed page. Smooth the UX in the admin page

Expand Down
15 changes: 13 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: Flizpay
Tags: kostenlos, payments, Zahlung, cashback, no-fee
Requires at least: 4.4
Tested up to: 6.7
Stable tag: 1.3.0
Stable tag: 1.4.0
Requires PHP: 7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.txt
Expand Down Expand Up @@ -116,9 +116,20 @@ Der erste Schritt, um FLIZpay in deinem Checkout zu installieren, ist die Erstel
- REMOVED
- Payment Failed page

- v1.4.0
- CHANGED
- Admin page uses admin user language
- ADDED
- Adding customer information to the transaction being created
- ADDED
- Value with cashback applied, when active, is now displayed in the checkout page

== Upgrade Notice ==

= v1.2.4 =
= v1.4.0 =
* The admin page now is presented on the admin user language or defaults to system language. Customer information add to the Transaction and value with cashback displayed on the checkout page

= v1.3.0 =
* The admin page now has a better UX and the payment failed page was removed in favor of FLIZ payment failed page

= v1.2.4 =
Expand Down
4 changes: 2 additions & 2 deletions flizpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Plugin Name: FLIZpay Gateway für WooCommerce
* Plugin URI: https://www.flizpay.de/companies
* Description: FLIZpay: 100% free!
* Version: 1.3.0
* Version: 1.4.0
* Author: FLIZpay
* Author URI: https://www.flizpay.de/companies
* License: GPL-2.0+
Expand All @@ -35,7 +35,7 @@
* Currently plugin version.
* Start at version 1.0.0 and use SemVer - https://semver.org
*/
define('FLIZPAY_VERSION', '1.3.0');
define('FLIZPAY_VERSION', '1.4.0');

function flizpay_check_dependencies()
{
Expand Down
2 changes: 1 addition & 1 deletion includes/class-flizpay-gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function flizpay_init_gateway_class()

class WC_Flizpay_Gateway extends WC_Payment_Gateway
{
static $VERSION = "1.3.0";
static $VERSION = "1.4.0";

public $icon;
public $title;
Expand Down
2 changes: 1 addition & 1 deletion includes/class-flizpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function __construct()
if (defined('FLIZPAY_VERSION')) {
$this->version = FLIZPAY_VERSION;
} else {
$this->version = '1.3.0';
$this->version = '1.4.0';
}
$this->plugin_name = 'flizpay';

Expand Down
2 changes: 1 addition & 1 deletion languages/flizpay-for-woocommerce-de_DE.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: FlizPay 1.3.0\n"
"Project-Id-Version: FlizPay 1.4.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-30 10:00+0000\n"
"PO-Revision-Date: 2024-07-30 10:00+0000\n"
Expand Down
2 changes: 1 addition & 1 deletion languages/flizpay-for-woocommerce-en_GB.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: FlizPay 1.3.0\n"
"Project-Id-Version: FlizPay 1.4.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-30 10:00+0000\n"
"PO-Revision-Date: 2024-07-30 10:00+0000\n"
Expand Down
2 changes: 1 addition & 1 deletion languages/flizpay-for-woocommerce-en_US.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: FlizPay 1.3.0\n"
"Project-Id-Version: FlizPay 1.4.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-30 10:00+0000\n"
"PO-Revision-Date: 2024-07-30 10:00+0000\n"
Expand Down
15 changes: 9 additions & 6 deletions public/js/flizpay-public.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ jQuery(function ($) {
const productsTotal = orderTotalElement[0];
const cashback = parseFloat(flizpay_frontend.cashback);
const taxElement = document.querySelectorAll(taxSelector);
const taxDesktop = taxElement[0];
const taxMobile = taxElement[1];
const taxDesktop = Array.isArray(taxElement) && taxElement[0] ? taxElement[0] : null;
const taxMobile = Array.isArray(taxElement) && taxElement[1] ?taxElement[1] : null;
const originalTax = taxDesktop?.innerHTML || taxMobile?.innerHTML;

let originalTotal = null; // Track the original total value
Expand Down Expand Up @@ -343,13 +343,16 @@ jQuery(function ($) {

document.querySelector(orderTotalSelector).innerHTML =
discountedLabel;
taxElement.innerHTML = navigator.language.includes("en")
? 'Incl. 19% VAT.'
: 'Inkl. 19% MwSt.'
if (taxElement) {
taxElement.innerHTML = navigator.language.includes("en")
? 'Incl. 19% VAT.'
: 'Inkl. 19% MwSt.'
}
} else {
const originalLabel = `${originalTotal.replace(".", ",")} €`;
document.querySelector(orderTotalSelector).innerHTML = originalLabel;
taxElement.innerHTML = originalTax;
if(taxElement)
taxElement.innerHTML = originalTax;
}

setTimeout(() => {
Expand Down

0 comments on commit 0b7d330

Please sign in to comment.