Automattic\WooCommerce\StoreApi\Utilities

OrderController::locations_differ │ private static │ WC 1.0

Checks whether two locations match a different shipping zone or tax rate.

Shipping zones and tax rates ignore case and postcode spacing, so a change in only those does not count.

Method of the class: OrderController{}

No Hooks.

Returns

bool.

Usage

$result = OrderController::locations_differ( $old_location, $new_location ): bool;
$old_location(array) (required)
Location before the change.
$new_location(array) (required)
Location after the change.

OrderController::locations_differ() code WC 11.3.0

private static function locations_differ( array $old_location, array $new_location ): bool {
	foreach ( self::LOCATION_FIELDS as $field ) {
		if ( self::normalize_location_field( $field, $old_location ) !== self::normalize_location_field( $field, $new_location ) ) {
			return true;
		}
	}

	return false;
}