Version 5.1.3 – Ship Logic Count Issue
-
We have identified a bug with the current update between 5.1.2 and 5.1.3
Please can the developers see the below, and ensure that a patch containing this fix is released on next update. The fix has bee priovided. in bold and italic,Expects and array key of $parcelArray['item'] but the previous version 5.1.2 was expecting the array key $parcelArray['itemCount’].
This fix will work for both
$parcel->item_count = !empty($parcelArray['itemCount']) ? $parcelArray['item'] :
File => /Users/ronald/Local Sites/click4coffee/app/public/wp-content/plugins/the-courier-guy/Core/ShipLogicApi.php
foreach ($parcelsArray as $parcelArray) {
$parcel = new stdClass();
$parcel->submitted_length_cm = $parcelArray['dim1'];
$parcel->submitted_width_cm = $parcelArray['dim2'];
$parcel->submitted_height_cm = $parcelArray['dim3'];
$parcel->submitted_description = $this->removeTrailingComma($parcelArray['description']);
$parcel->item_count = !empty($parcelArray['itemCount']) ? $parcelArray['item'] : $parcelArray['item'];
$parcel->submitted_weight_kg = wc_get_weight($parcelArray['actmass'], 'kg');
$parcels[] = $parcel;
}
The topic ‘Version 5.1.3 – Ship Logic Count Issue’ is closed to new replies.