diff --git a/Plugin/AddWeightUnitToOrderPlugin.php b/Plugin/AddWeightUnitToOrderPlugin.php index 8efcf0df16cdfcc490f6e0c4ed92b3a8afa18855..d619ddec7cb9d316a808e1d649ea943e37ea0ede 100644 --- a/Plugin/AddWeightUnitToOrderPlugin.php +++ b/Plugin/AddWeightUnitToOrderPlugin.php @@ -38,10 +38,12 @@ class AddWeightUnitToOrderPlugin $convertedWeight = $weight * 0.45359237; // Set the converted weight back to the item - $orderItem->setData('weight', $weight); + $orderItem->setWeight($convertedWeight); + $orderItem->setData('weight', $convertedWeight); } } - + + return [$order]; } } diff --git a/composer.json b/composer.json index c78f4cf5bf241d126199ab58f5521fda58a58ec5..63303ed1e96ff42309d1791cb8dc3830aee2296d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "bobgo/bobgo", - "description": "Smart shipping and order management solution in South Africa", + "name": "bob-public-utils/bobgo-magento-extension", + "description": "Smart shipping and order management solution in South Africa", "type": "magento2-module", "version": "1.0.0", "authors": [ @@ -14,7 +14,11 @@ "AFL-3.0", "OSL-3.0" ], - "autoload": { + "require": { + "php": "^7.4 || ^8.0 || ^8.1" + }, + + "autoload": { "files": [ "registration.php" ],