- Issue created by @joewickert
I tried the dev release, and there were a couple of errors that prevented me from using the module.
The first was triggered when trying to install the module.ArgumentCountError: Too few arguments to function Drupal\commerce_shipping\Packer\DefaultPacker::__construct(), 1 passed in /srv/www/project/site/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 261 and exactly 2 expected in /srv/www/project/site/web/modules/contrib/commerce_shipping/src/Packer/DefaultPacker.php on line 38
I managed to fix this by adding "@string_translation" to the arguments of the Drupal\commerce_auspost\Packer\CommerceAusPostPacker class in the commerce_auspost.services.yml file.
This allowed the module to be installed, but I got a similar error when trying to create a shipping method.
ArgumentCountError: Too few arguments to function Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod\ShippingMethodBase::__construct(), 4 passed in /srv/www/project/site/web/modules/contrib/commerce_auspost/src/Plugin/Commerce/ShippingMethod/AusPost.php on line 243 and exactly 5 expected in Drupal\commerce_shipping\Plugin\Commerce\ShippingMethod\ShippingMethodBase->__construct() (line 66 of /srv/www/project/site/web/modules/contrib/commerce_shipping/src/Plugin/Commerce/ShippingMethod/ShippingMethodBase.php).
This one looks like the parent method is missing an argument of type workflow manager but my programming skills are limited to changing the occasional thing and hoping it works so I'm not really sure.
---
@joewickert I tried your fork and it's working! The one thing I had to do was to specifically require fontis/auspost-api-php dev-master because otherwise my min stability wouldn't allow it to be added by the auspost module.
The other thing I was struggling with while using the forked version was that it doesn't seem like shipping methods are hidden based on address. e.g. if I enable the standard domestic parcel post and the international air mail post, then if I set my address to overseas, both options are still visible and both show the same price, even though the price increases when changing to an international address. The same is true for switching back to domestic i.e. price goes down, both still visible. it could be that I just need to create multiple shipping methods and add conditions myself?