Plugin Directory

Changeset 3021501


Ignore:
Timestamp:
01/14/2024 10:03:15 AM (2 years ago)
Author:
hfdepost
Message:

Performance Improvement

Location:
hfd-epost-integration/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • hfd-epost-integration/trunk/hfd-woocommerce-epost.php

    r3014574 r3021501  
    44Plugin URI:
    55Description: Add shipping method of ePost, allowing the user on the checkout, to select the pickup location point from a google map popup. Also allows to synch the order to HFD API after the order is created.
    6 Version: 1.6
     6Version: 1.7
    77Author: HFD
    88Author URI: https://www.hfd.co.il
  • hfd-epost-integration/trunk/readme.txt

    r3014574 r3021501  
    55Requires at least: 4.0
    66Tested up to: 6.4
    7 Stable tag: 1.6
     7Stable tag: 1.7
    88Requires PHP: 5.4
    99License: GPLv2 or later
  • hfd-epost-integration/trunk/templates/cart/footer.php

    r3004105 r3021501  
    133133                }
    134134            });
     135           
     136            if( jQuery( "body" ).hasClass( "woocommerce-cart" ) ){
     137                var mainBlock = jQuery('#israelpost-additional');
     138                if( mainBlock.siblings( 'input.shipping_method' ).is(':checked') ){
     139                    if( !cityLoaded || mainBlock.find( '#city-list' ).find( 'option' ).length == 1 ){
     140                        EpostList.init({
     141                            saveSpotInfoUrl: '<?php echo esc_html( admin_url( 'admin-ajax.php' ) ); ?>',
     142                            getSpotsUrl: '<?php echo esc_html( admin_url( 'admin-ajax.php?action=get_spots' ) ); ?>',
     143                            cities: <?php echo json_encode( $helper->getCities() ); ?>
     144                        });
     145                        cityLoaded = true;
     146                    }
     147                    mainBlock.show();
     148                }else{
     149                    mainBlock.hide();
     150                }
     151            }
    135152        });
    136153    </script>
Note: See TracChangeset for help on using the changeset viewer.