Plugin Directory

Changeset 2434376


Ignore:
Timestamp:
12/08/2020 03:55:07 PM (5 years ago)
Author:
sinalite
Message:

Woocommere Shipping - repeated calls to external server is fixed for Qty change on checkout, address change still triggers twice which will be fixed later

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sinalite-for-woocommerce/trunk/includes/sinalite-shipping-method.php

    r2427447 r2434376  
    104104    {
    105105
     106        if ( ! in_the_loop() ) {
     107            return $packages;
     108        }
     109
     110        if ( ! is_singular() ) {
     111            return $packages;
     112        }
     113
     114        if ( ! is_main_query() ) {
     115            return $packages;
     116        }
     117
     118
    106119        if ($this->shipping_enabled !== self::WOO_TRUE) {
    107120            return $packages;
     
    278291        }
    279292
     293        remove_filter('woocommerce_cart_shipping_packages', [$this, 'calculate_shipping_rates']);
     294
    280295        return $splittedPackages;
    281296    }
Note: See TracChangeset for help on using the changeset viewer.