Plugin Directory

Changeset 3394617


Ignore:
Timestamp:
11/12/2025 07:44:13 PM (4 months ago)
Author:
shipbubble
Message:

FunnelKit combability update

Location:
shipbubble
Files:
60 added
4 edited

Legend:

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

    r3347404 r3394617  
    9898            // hide notice
    9999            $('#shipping-notice').remove();
     100
     101            if ( $('.iti__selected-dial-code').length !== 0 ) {
     102                let phoneDialCode = $('.iti__selected-dial-code').first().text();
     103
     104                if (!phone.startsWith('+')) {
     105                    phone = phoneDialCode + phone;
     106                }
     107            }
    100108
    101109            // Assemble payload
     
    145153            }
    146154
    147             $('<div>', {
     155            let shippingNotice = $('<div>', {
    148156                id: 'shipping-notice',
    149157                class: 'woocommerce-error',
    150158                style: 'font-size:16px',
    151             }).text(`Ensure that you have filled your ${errorBox.join(', ')}`).appendTo('#order_review_heading').show();
     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            }
    152167
    153168            $(requestRatesBtn).prop('checked', false)
     
    297312
    298313                    $(requestRatesBtn).prop('checked', false)
    299 
    300314                }
    301315            }
  • shipbubble/trunk/public/woocommerce/checkout.php

    r3326861 r3394617  
    123123function shipbubble_courier_setup_on_change()
    124124{
    125     if (is_checkout()) {
     125    $options = get_option(WC_SHIPBUBBLE_ID, shipbubble_wc_options_default());
     126
     127    $isShipbubbleActive = isset($options['activate_shipbubble']) ? sanitize_text_field($options['activate_shipbubble']) : 'no';
     128    $isShipbubbleActive = $isShipbubbleActive == 'yes';
     129    if (is_checkout() && $isShipbubbleActive) {
    126130?>
    127131
     
    158162                                $('#shipbubble_courier_set').val('true');
    159163
    160                                 $('html, body').animate({
    161                                     scrollTop: $(".woocommerce-shipping-totals.shipping").offset().top
    162                                 }, 1000);
     164                                let shippingTotals = $(".woocommerce-shipping-totals.shipping");
     165                                if (shippingTotals.length) {
     166                                    $('html, body').animate({
     167                                        scrollTop: $(".woocommerce-shipping-totals.shipping").offset().top
     168                                    }, 1000);
     169                                }
    163170
    164171                                jQuery('body').trigger('update_checkout');
     
    169176
    170177                    // Original handler for billing/shipping changes
    171                     $('div#customer_details').on('change', 'input[name^="billing"], input[name^="shipping"], select[name^="billing"], select[name^="shipping"]', function handleShippingChanges() {
     178                    $('form').on('change', 'input[name^="billing"], input[name^="shipping"], select[name^="billing"], select[name^="shipping"]', function handleShippingChanges() {
    172179                        let list = $('#courier-list')
    173180                        sbSlogan = $('.sb-slogan-container');
  • shipbubble/trunk/readme.txt

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

    r3347404 r3394617  
    99 * Requires at least: 4.0
    1010 * Tested up to: 6.8
    11  * Version: 2.9.2
     11 * Version: 2.10
    1212 * Requires PHP: 5.6
    1313 * Text Domain:  shipbubble
     
    4141require_once plugin_dir_path(__FILE__) . 'includes/endpoints.php';
    4242require_once plugin_dir_path(__FILE__) . 'includes/core-methods.php';
     43require_once plugin_dir_path(__FILE__) . 'includes/compatibilities.php';
    4344
    4445// public
Note: See TracChangeset for help on using the changeset viewer.