Plugin Directory

Changeset 2928006


Ignore:
Timestamp:
06/19/2023 02:09:45 PM (3 years ago)
Author:
sendbox
Message:

new update on cart

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sendbox-shipping/trunk/includes/class-wooss-shipping-method.php

    r2801237 r2928006  
    175175                        $destination_state = 'London';
    176176                    }
     177                    //remove comma
     178                    if (strpos($destination_state, ',') !== false) {
     179                        $stateParts = explode(',', $destination_state);
     180                        $destination_state = trim(end($stateParts));
     181                      }
    177182                    if ( empty( $destination_city ) ) {
    178183                        $destination_city = $package['destination']['city'];
    179184                    }
     185
     186                    if (strpos($destination_city, ',') !== false) {
     187                        $cityParts = explode(',', $destination_city);
     188                        $destination_city = trim($cityParts[0]);
     189                      }
     190                   
    180191
    181192                    $weight             = $quantity * $weight;
Note: See TracChangeset for help on using the changeset viewer.