diff --git a/changelog.txt b/changelog.txt index 2ae207139..31998a915 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,12 @@ *** Changelog *** += 1.2.1 - 2021-03-08 = +* Fix - Address compatibility issue with Jetpack. + += 1.2.0 - 2021-03-08 = +* Add - Rework onboarding code and add REST controller for integration with the OBW. #121 +* Fix - Remove spinner on click, on cancel and on error. #124 + = 1.1.0 - 2021-02-01 = * Add - Buy Now Pay Later for UK. #104 * Add - DE now has 12 month installments. #106 diff --git a/composer.json b/composer.json index 3fdaf9e21..cec1c7724 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "license": "GPL-2.0", "require": { "dhii/module-interface": "0.1", - "psr/container": "^1.0", + "psr/container": "1.0.0", "container-interop/service-provider": "^0.4.0", "dhii/containers": "v0.1.0-alpha1", "dhii/wp-containers": "v0.1.0-alpha1", diff --git a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js index eb120623d..03451c144 100644 --- a/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js +++ b/modules/ppcp-button/resources/js/modules/ActionHandler/CheckoutActionHandler.js @@ -19,9 +19,6 @@ class CheckoutActionHandler { const errorHandler = this.errorHandler; const formSelector = this.config.context === 'checkout' ? 'form.checkout' : 'form#order_review'; - spinner.setTarget(formSelector); - spinner.block(); - const formValues = jQuery(formSelector).serialize(); return fetch(this.config.ajax.create_order.endpoint, { @@ -64,8 +61,12 @@ class CheckoutActionHandler { return { createOrder, onApprove:onApprove(this, this.errorHandler, this.spinner), - onError: (error) => { + onCancel: () => { + spinner.unblock(); + }, + onError: () => { this.errorHandler.genericError(); + spinner.unblock(); } } } diff --git a/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js b/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js index 48327ddba..6e4b2ca88 100644 --- a/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js +++ b/modules/ppcp-button/resources/js/modules/Renderer/CreditCardRenderer.js @@ -115,6 +115,9 @@ class CreditCardRenderer { payload.orderID = payload.orderId; this.spinner.unblock(); return contextConfig.onApprove(payload); + }).catch(() => { + this.spinner.unblock(); + this.errorHandler.genericError() }); } else { this.spinner.unblock(); @@ -147,4 +150,4 @@ class CreditCardRenderer { ) } } -export default CreditCardRenderer; \ No newline at end of file +export default CreditCardRenderer; diff --git a/package.json b/package.json index 85d9f419d..4083adabb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-paypal-payments", - "version": "1.1.0", + "version": "1.2.1", "description": "WooCommerce PayPal Payments", "repository": "https://github.com/woocommerce/woocommerce-paypal-payments", "license": "GPL-2.0", diff --git a/readme.txt b/readme.txt index 3bafd47a0..8ce11e1c8 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce, paypal, payments, ecommerce, e-commerce, store, sales, sell, Requires at least: 5.3 Tested up to: 5.6 Requires PHP: 7.0 -Stable tag: 1.1.0 +Stable tag: 1.2.1 License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -58,6 +58,13 @@ Follow the steps below to connect the plugin to your PayPal account: == Changelog == += 1.2.1 = +* Fix - Address compatibility issue with Jetpack. + += 1.2.0 = +* Add - Rework onboarding code and add REST controller for integration with the OBW. #121 +* Fix - Remove spinner on click, on cancel and on error. #124 + = 1.1.0 = * Add - Buy Now Pay Later for UK. #104 * Add - DE now has 12 month installments. #106 diff --git a/woocommerce-paypal-payments.php b/woocommerce-paypal-payments.php index a25c077b7..466831182 100644 --- a/woocommerce-paypal-payments.php +++ b/woocommerce-paypal-payments.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce PayPal Payments * Plugin URI: https://woocommerce.com/products/woocommerce-paypal-payments/ * Description: PayPal's latest complete payments processing solution. Accept PayPal, PayPal Credit, credit/debit cards, alternative digital wallets local payment types and bank accounts. Turn on only PayPal options or process a full suite of payment methods. Enable global transaction with extensive currency and country coverage. - * Version: 1.1.0 + * Version: 1.2.1 * Author: WooCommerce * Author URI: https://woocommerce.com/ * License: GPL-2.0