diff --git a/.github/workflows/aqua.yml b/.github/workflows/aqua.yml index 352d50ca..97fbda06 100644 --- a/.github/workflows/aqua.yml +++ b/.github/workflows/aqua.yml @@ -3,6 +3,7 @@ on: pull_request: branches: - main + - develop jobs: aqua: diff --git a/CHANGELOG.md b/CHANGELOG.md index a264c3e6..2b5415ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ========= +v5.2.0 +------ +* feature : HPOS compatibility +* feat: Update translations +* fix: widget XSS + v5.1.4 ------ * feat: compatibility Woocommerce 8.2.1 diff --git a/README.md b/README.md index fccd710a..5a23555f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - Tested up to Wordpress: 6.3.2 - Tested up to Woocommerce: 8.2.1 - Requires PHP: 5.6 -- Stable tag: 5.1.4 +- Stable tag: 5.2.0 - License: GPLv3 - License URI: https://www.gnu.org/licenses/gpl-3.0.html - Support: support@getalma.eu diff --git a/bin/retrieve-widget-files.sh b/bin/retrieve-widget-files.sh index 487fd7e0..eb0ebef2 100755 --- a/bin/retrieve-widget-files.sh +++ b/bin/retrieve-widget-files.sh @@ -20,8 +20,8 @@ GIT_WC_RAW_DIR="${GIT_WC_DIST_DIR}/raw" RAW_FILES=" css/widgets.css -js/widgets.umd.js -js/widgets.umd.js.map +js/widgets-wc.umd.js +js/widgets-wc.umd.js.map " #}}} diff --git a/readme.txt b/readme.txt index dd843d57..db56fe58 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: payments, BNPL, woocommerce, ecommerce, e-commerce, payment gateway, sell, Requires at least: 4.4 Tested up to: 6.3 Requires PHP: 5.6 -Stable tag: 5.1.4 +Stable tag: 5.2.0 License: GPLv3 License URI: https://www.gnu.org/licenses/gpl-3.0.html @@ -51,6 +51,11 @@ You can find more documentation on our [website](https://docs.almapay.com/docs/w == Changelog == += 5.2.0 = +* feat: Update translations +* fix: widget XSS +* feature : HPOS compatibility + = 5.1.4 = * feat: Compatibility Woocommerce 8.2.1 * feat: change fee wording in the BO diff --git a/src/alma-gateway-for-woocommerce.php b/src/alma-gateway-for-woocommerce.php index aeb3416e..d5cfa01f 100644 --- a/src/alma-gateway-for-woocommerce.php +++ b/src/alma-gateway-for-woocommerce.php @@ -3,7 +3,7 @@ * Plugin Name: Alma - Pay in installments or later for WooCommerce * Plugin URI: https://docs.almapay.com/docs/woocommerce * Description: Install Alma and boost your sales! It's simple and guaranteed, your cash flow is secured. 0 commitment, 0 subscription, 0 risk. - * Version: 5.1.4 + * Version: 5.2.0 * Author: Alma * Author URI: https://almapay.com * License: GNU General Public License v3.0 @@ -38,7 +38,7 @@ } if ( ! defined( 'ALMA_VERSION' ) ) { - define( 'ALMA_VERSION', '5.1.4' ); + define( 'ALMA_VERSION', '5.2.0' ); } if ( ! defined( 'ALMA_PLUGIN_FILE' ) ) { define( 'ALMA_PLUGIN_FILE', __FILE__ ); @@ -86,6 +86,19 @@ function alma_plugin() { */ add_action( 'plugins_loaded', 'alma_plugin' ); +add_action( + 'before_woocommerce_init', + function() { + if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) { + /** + * Skip WC class check. + * + * @psalm-suppress UndefinedClass + */ + \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true ); + } + } +); diff --git a/src/assets/widget/js/widgets.umd.js b/src/assets/widget/js/widgets-wc.umd.js similarity index 99% rename from src/assets/widget/js/widgets.umd.js rename to src/assets/widget/js/widgets-wc.umd.js index 283ac36a..ea907f45 100644 --- a/src/assets/widget/js/widgets.umd.js +++ b/src/assets/widget/js/widgets-wc.umd.js @@ -1700,7 +1700,7 @@ } function polyfillClassList(ele) { - if (!ele || !('innerHTML' in ele)) throw TypeError('Illegal invocation'); + if (!ele || !('innerText' in ele)) throw TypeError('Illegal invocation'); ele.detachEvent('onpropertychange', whenPropChanges); // prevent duplicate handler infinite loop allowTokenListConstruction = 1; @@ -6868,21 +6868,21 @@ "credit-features.credit-cost-display": "{creditCost} (gemiddeld rente percentage {taegPercentage})", "credit-features.information": "Een lening is bindend en moet worden terugbetaald. Ga na of je het kunt terugbetalen voordat je jezelf vastlegt.", "credit-features.total-credit-cost": "Waarvan kredietkosten", - "eligibility-modal.bullet-1": "Kies Alma bij het afrekenen om de eerste termijn te voldoen via jouw gewenste betaalmethode.", - "eligibility-modal.bullet-2": "Laat ons je begeleiden om de betaling binnen 1 minuut te valideren zonder dat je een account hoeft aan te maken.", + "eligibility-modal.bullet-1": "Kies Alma bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.", + "eligibility-modal.bullet-2": "Betaal gemakkelijk binnen 1 minuut . Je hebt hier geen account voor nodig.", "eligibility-modal.bullet-3": "Behoudt de controle en bepaal je eigen tempo. Bij Alma schuif je de deadlines gemakkelijk vooruit of achteruit. Zonder bijkomende kosten.", "eligibility-modal.no-eligibility": "Oeps, het lijkt erop dat de simulatie niet werkte.", - "eligibility-modal.p1x-bullet-1": "Kies Alma - Betaal nu bij het afrekenen om de eerste termijn te voldoen via jouw gewenste betaalmethode.", + "eligibility-modal.p1x-bullet-1": "Kies Alma - Betaal nu bij het afrekenen om de eerste termijnbetaling te voldoen. Dit kan gemakkelijk via jouw favoriete betaalmethode.", "eligibility-modal.p1x-bullet-2": "Vul jouw gegevens in", "eligibility-modal.p1x-bullet-3": "De bevestiging van jouw betaling is onmiddellijk!", - "eligibility-modal.title-deferred-plan": "Betaal in rentevrije termijnen bij Alma - zonder BKR of CKP registratie.", - "eligibility-modal.title-normal": "Betaal in rentevrije termijnen bij Alma - zonder BKR of CKP registratie.", + "eligibility-modal.title-deferred-plan": "Betaal in termijnen bij Alma - helemaal rentevrij.", + "eligibility-modal.title-normal": "Betaal in termijnen bij Alma - helemaal rentevrij.", "eligibility-modal.title-pay-now": "Betaal met iDEAL of per creditcard bij Alma.", "installments.today": "Vandaag", "installments.total-amount": "Totaal", "installments.total-fees": "Waarvan kosten (incl. BTW)", "payment-plan-strings.day-abbreviation": "D{deferredDays}", - "payment-plan-strings.default-message": "Betaal in rentevrije termijnen bij Alma - zonder BKR of CKP registratie", + "payment-plan-strings.default-message": "Betaal in termijnen bij Alma - helemaal rentevrij", "payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}", "payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}", "payment-plan-strings.ineligible-lower-than-min": "Vanaf {minAmount}", @@ -7398,7 +7398,7 @@ } var D = {}; - "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function (a) { + "children dangerouslySetInnerHTML defaultValue defaultChecked innerText suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function (a) { D[a] = new B(a, 0, !1, a, null, !1, !1); }); [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function (a) { @@ -7932,9 +7932,9 @@ }); } : a; }(function (a, b) { - if (a.namespaceURI !== kb.svg || "innerHTML" in a) a.innerHTML = b;else { + if (a.namespaceURI !== kb.svg || "innerText" in a) a.innerText = b;else { nb = nb || document.createElement("div"); - nb.innerHTML = "" + b.valueOf().toString() + ""; + nb.innerText = "" + b.valueOf().toString() + ""; for (b = nb.firstChild; a.firstChild;) a.removeChild(a.firstChild); @@ -12217,7 +12217,7 @@ } else { g = 9 === e.nodeType ? e : e.ownerDocument; a === kb.html && (a = lb(c)); - a === kb.html ? "script" === c ? (a = g.createElement("div"), a.innerHTML = "