Plugin Directory

Changeset 3111505


Ignore:
Timestamp:
07/03/2024 07:48:53 AM (21 months ago)
Author:
tripleatechnology
Message:

RELEASE | 2.0.17 | FIX: Promt removed whenever payment form success in checkout page

Location:
triplea-cryptocurrency-payment-gateway-for-woocommerce
Files:
9 edited
2 copied

Legend:

Unmodified
Added
Removed
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/assets/js/checkout.js

    r3102572 r3111505  
    125125        triplea_displayEmbeddedPaymentForm();
    126126    };
    127 
     127    // Function to remove the beforeunload event listener
     128    function removeBeforeUnload() {
     129        window.removeEventListener("beforeunload", handleBeforeUnload);
     130    }
     131
     132    // Function to handle the beforeunload event
     133    function handleBeforeUnload(e) {
     134        var message = "Are you sure you want to leave?";
     135        e.returnValue = message;
     136        return message;
     137    }
    128138    window.triplea_displayEmbeddedPaymentForm = function () {
    129139        const iframeUrlNode = document.getElementById(
     
    170180        );
    171181        insertionNode.parentNode.insertBefore(iframeNode, btnNode);
    172         window.addEventListener("beforeunload", function (e) {
    173             var message = "Are you sure you want to leave?";
    174             e.returnValue = message;
    175             return message;
    176         });
     182        window.addEventListener("beforeunload", handleBeforeUnload);
     183
    177184        (function () {
    178185            window.addEventListener(
     
    197204                        } else if (response[0] === "triplea.paymentSuccess") {
    198205                            // console.debug('Catching ' + response[0] + ' event');
     206                            removeBeforeUnload();
    199207                            triplea_submitForm();
    200208                        } else if (response[0] === "triplea.formExpired") {
    201209                            // console.debug('Catching ' + response[0] + ' event');
     210                            removeBeforeUnload();
    202211                            triplea_displayBackupPlaceOrderBtn();
    203212                        }
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/readme.txt

    r3102572 r3111505  
    77Requires at least: 5.5
    88Tested up to: 6.5.4
    9 Stable tag: 2.0.16
     9Stable tag: 2.0.17
    1010Requires PHP: 7.0
    1111License: GPLv2 or later
     
    109109== Changelog ==
    110110
     111= 2.0.17 =
     112Fixed: Leave site promt removed in checkout page after displaying payment form success
     113
    111114= 2.0.16 =
    112115Fixed: Order currency is now visible in the payment form
     
    302305== Upgrade Notice ==
    303306
     307= 2.0.17 =
     308Simply install the update. No further action is needed.
     309
    304310= 2.0.16 =
    305311Simply install the update. No further action is needed.
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/triplea-cryptocurrency-payment-gateway-for-woocommerce.php

    r3102572 r3111505  
    1717 * Plugin URI:        https://wordpress.org/plugins/triplea-cryptocurrency-payment-gateway-for-woocommerce/
    1818 * Description:       Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by TripleA.
    19  * Version:           2.0.16
     19 * Version:           2.0.17
    2020 * Author:            Triple-A Team
    2121 * Author URI:        https://triple-a.io
     
    5050     * $var string
    5151     */
    52     const version = '2.0.16';
     52    const version = '2.0.17';
    5353
    5454    /*
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/trunk/assets/js/checkout.js

    r3102572 r3111505  
    125125        triplea_displayEmbeddedPaymentForm();
    126126    };
    127 
     127    // Function to remove the beforeunload event listener
     128    function removeBeforeUnload() {
     129        window.removeEventListener("beforeunload", handleBeforeUnload);
     130    }
     131
     132    // Function to handle the beforeunload event
     133    function handleBeforeUnload(e) {
     134        var message = "Are you sure you want to leave?";
     135        e.returnValue = message;
     136        return message;
     137    }
    128138    window.triplea_displayEmbeddedPaymentForm = function () {
    129139        const iframeUrlNode = document.getElementById(
     
    170180        );
    171181        insertionNode.parentNode.insertBefore(iframeNode, btnNode);
    172         window.addEventListener("beforeunload", function (e) {
    173             var message = "Are you sure you want to leave?";
    174             e.returnValue = message;
    175             return message;
    176         });
     182        window.addEventListener("beforeunload", handleBeforeUnload);
     183
    177184        (function () {
    178185            window.addEventListener(
     
    197204                        } else if (response[0] === "triplea.paymentSuccess") {
    198205                            // console.debug('Catching ' + response[0] + ' event');
     206                            removeBeforeUnload();
    199207                            triplea_submitForm();
    200208                        } else if (response[0] === "triplea.formExpired") {
    201209                            // console.debug('Catching ' + response[0] + ' event');
     210                            removeBeforeUnload();
    202211                            triplea_displayBackupPlaceOrderBtn();
    203212                        }
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/trunk/readme.txt

    r3102572 r3111505  
    77Requires at least: 5.5
    88Tested up to: 6.5.4
    9 Stable tag: 2.0.16
     9Stable tag: 2.0.17
    1010Requires PHP: 7.0
    1111License: GPLv2 or later
     
    109109== Changelog ==
    110110
     111= 2.0.17 =
     112Fixed: Leave site promt removed in checkout page after displaying payment form success
     113
    111114= 2.0.16 =
    112115Fixed: Order currency is now visible in the payment form
     
    302305== Upgrade Notice ==
    303306
     307= 2.0.17 =
     308Simply install the update. No further action is needed.
     309
    304310= 2.0.16 =
    305311Simply install the update. No further action is needed.
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/tags/2.0.17/trunk/triplea-cryptocurrency-payment-gateway-for-woocommerce.php

    r3102572 r3111505  
    1616 * Plugin Name:       Crypto Payment Gateway for WooCommerce
    1717 * Plugin URI:        https://wordpress.org/plugins/triplea-cryptocurrency-payment-gateway-for-woocommerce/
    18  * Description:       Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by TripleA.
    19  * Version:           2.0.16
     18 * Description:       Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by Triple-A.
     19 * Version:           2.0.17
    2020 * Author:            Triple-A Team
    2121 * Author URI:        https://triple-a.io
     
    5050     * $var string
    5151     */
    52     const version = '2.0.16';
     52    const version = '2.0.17';
    5353
    5454    /*
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/assets/js/checkout.js

    r3102572 r3111505  
    125125        triplea_displayEmbeddedPaymentForm();
    126126    };
    127 
     127    // Function to remove the beforeunload event listener
     128    function removeBeforeUnload() {
     129        window.removeEventListener("beforeunload", handleBeforeUnload);
     130    }
     131
     132    // Function to handle the beforeunload event
     133    function handleBeforeUnload(e) {
     134        var message = "Are you sure you want to leave?";
     135        e.returnValue = message;
     136        return message;
     137    }
    128138    window.triplea_displayEmbeddedPaymentForm = function () {
    129139        const iframeUrlNode = document.getElementById(
     
    170180        );
    171181        insertionNode.parentNode.insertBefore(iframeNode, btnNode);
    172         window.addEventListener("beforeunload", function (e) {
    173             var message = "Are you sure you want to leave?";
    174             e.returnValue = message;
    175             return message;
    176         });
     182        window.addEventListener("beforeunload", handleBeforeUnload);
     183
    177184        (function () {
    178185            window.addEventListener(
     
    197204                        } else if (response[0] === "triplea.paymentSuccess") {
    198205                            // console.debug('Catching ' + response[0] + ' event');
     206                            removeBeforeUnload();
    199207                            triplea_submitForm();
    200208                        } else if (response[0] === "triplea.formExpired") {
    201209                            // console.debug('Catching ' + response[0] + ' event');
     210                            removeBeforeUnload();
    202211                            triplea_displayBackupPlaceOrderBtn();
    203212                        }
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/readme.txt

    r3102572 r3111505  
    77Requires at least: 5.5
    88Tested up to: 6.5.4
    9 Stable tag: 2.0.16
     9Stable tag: 2.0.17
    1010Requires PHP: 7.0
    1111License: GPLv2 or later
     
    109109== Changelog ==
    110110
     111= 2.0.17 =
     112Fixed: Leave site promt removed in checkout page after displaying payment form success
     113
    111114= 2.0.16 =
    112115Fixed: Order currency is now visible in the payment form
     
    302305== Upgrade Notice ==
    303306
     307= 2.0.17 =
     308Simply install the update. No further action is needed.
     309
    304310= 2.0.16 =
    305311Simply install the update. No further action is needed.
  • triplea-cryptocurrency-payment-gateway-for-woocommerce/trunk/triplea-cryptocurrency-payment-gateway-for-woocommerce.php

    r3102572 r3111505  
    1616 * Plugin Name:       Crypto Payment Gateway for WooCommerce
    1717 * Plugin URI:        https://wordpress.org/plugins/triplea-cryptocurrency-payment-gateway-for-woocommerce/
    18  * Description:       Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by TripleA.
    19  * Version:           2.0.16
     18 * Description:       Offer cryptocurrency as a payment option on your website and get access to even more clients. Receive payments in cryptocurrency or in your local currency, directly in your bank account. Enjoy an easy setup, no cryptocurrency expertise required. Powered by Triple-A.
     19 * Version:           2.0.17
    2020 * Author:            Triple-A Team
    2121 * Author URI:        https://triple-a.io
     
    5050     * $var string
    5151     */
    52     const version = '2.0.16';
     52    const version = '2.0.17';
    5353
    5454    /*
Note: See TracChangeset for help on using the changeset viewer.