Plugin Directory

Changeset 3397914


Ignore:
Timestamp:
11/18/2025 10:00:15 AM (4 months ago)
Author:
shipbubble
Message:

Changed checkout error to use the sweet alert

Location:
shipbubble
Files:
59 added
3 edited

Legend:

Unmodified
Added
Removed
  • shipbubble/trunk/public/js/couriers-on-checkout.js

    r3394617 r3397914  
    153153            }
    154154
    155             let shippingNotice = $('<div>', {
    156                 id: 'shipping-notice',
    157                 class: 'woocommerce-error',
    158                 style: 'font-size:16px',
    159             }).text(`Ensure that you have filled your ${errorBox.join(', ')}`);
    160 
    161             if ($('#order_review_heading').length === 0) {
    162                 // put shipping notice before the div with class .shipbubble-delivery-method-container
    163                 shippingNotice.prependTo('.shipbubble-delivery-method-container').show();
    164             } else {
    165                 shippingNotice.appendTo('#order_review_heading').show();
    166             }
     155            Swal.fire({
     156                title: '',
     157                text: `Ensure that you have filled your ${errorBox.join(', ')}`,
     158                showConfirmButton: false,
     159                showCloseButton: true,
     160                width: 400,
     161                customClass: {
     162                    closeButton: "shipbubble-close-button"
     163                }
     164            });
     165
     166            // if ($('#order_review_heading').length === 0) {
     167            //  // put shipping notice before the div with class .shipbubble-delivery-method-container
     168            //  shippingNotice.prependTo('.shipbubble-delivery-method-container').show();
     169            // } else {
     170            //  shippingNotice.appendTo('#order_review_heading').show();
     171            // }
    167172
    168173            $(requestRatesBtn).prop('checked', false)
     
    294299                    }
    295300
    296                     $('<div>', {
    297                         id: 'shipping-notice',
    298                         class: 'woocommerce-info',
    299                         style: 'font-size:16px',
    300                     }).text(`${responseMessage}`).appendTo('#order_review_heading').show();
    301 
    302301                    Swal.fire({
    303302                        title: '',
     
    325324            list.empty();
    326325
    327             $('<div>', {
    328                 id: 'shipping-notice',
    329                 class: 'woocommerce-error',
    330                 style: 'font-size:16px',
    331             }).text(`unable to display couriers list, please try again later`).appendTo('#order_review_heading').show();
     326            Swal.fire({
     327                title: '',
     328                text: `Unable to display couriers list, please try again later`,
     329                showConfirmButton: false,
     330                showCloseButton: true,
     331                width: 400,
     332                customClass: {
     333                    closeButton: "shipbubble-close-button"
     334                }
     335            });
    332336
    333337        });
  • shipbubble/trunk/readme.txt

    r3394617 r3397914  
    55Requires at least: 4.0
    66Tested up to: 6.5
    7 Stable tag: 2.10
     7Stable tag: 2.10.1
    88Requires PHP: 5.6
    99License: GPLv3 or later
     
    7070
    7171== Changelog ==
     72= 2.10.1 =
     73* Improvements
     74
    7275= 2.10 =
    7376* FunnelKit compability update
  • shipbubble/trunk/shipbubble.php

    r3394617 r3397914  
    99 * Requires at least: 4.0
    1010 * Tested up to: 6.8
    11  * Version: 2.10
     11 * Version: 2.10.1
    1212 * Requires PHP: 5.6
    1313 * Text Domain:  shipbubble
Note: See TracChangeset for help on using the changeset viewer.