Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning/error getAvailableShippingMethods() #1508

Closed
bavodeclercq opened this issue Jun 16, 2020 · 4 comments
Closed

Deprecation warning/error getAvailableShippingMethods() #1508

bavodeclercq opened this issue Jun 16, 2020 · 4 comments
Labels
💡 enhancement Ideas and suggestions

Comments

@bavodeclercq
Copy link
Contributor

bavodeclercq commented Jun 16, 2020

Description
I'm getting the following deprecation warning/error:
Order::getAvailableShippingMethods() has been deprecated. Use Order::getAvailableShippingMethodOptions().

To Reproduce

  1. Set 'throwExceptions' for deprecator in app.php
  2. Go to order detail in CP (/admin/commerce/orders/{id})

Expected behavior
Viewing order detail without the deprecation warning/errror.

Additional info

  • Craft version: 3.4.23
  • PHP version: 7.3.17
  • Database driver & version: MySQL 5.7.29
  • Plugins & versions: Craft Commerce 3.1.8
@lukeholder
Copy link
Member

Thanks for reporting that! I’ve just fixed it for the next release.

To get the fix early, change your craftcms/commerce requirement in composer.json to:

"require": {
  "craftcms/commerce": "dev-develop#d639a89c15d404fcda53230827dd282504eb8aa0 as 3.1.8",
  "...": "..."
}

Then run composer update.

@lukeholder lukeholder added 💡 enhancement Ideas and suggestions and removed New labels Jun 17, 2020
lukeholder added a commit that referenced this issue Jun 17, 2020
@bavodeclercq
Copy link
Contributor Author

I'm sorry but I'm still getting the warning/error.

@bavodeclercq
Copy link
Contributor Author

@lukeholder The issue is still there. The warning/error returns in both the CP and the front-end (saving shipping method).

@davidhellmann
Copy link
Contributor

I also get the error and with:

'deprecator' => [
  'throwExceptions' => YII_DEBUG,
],

my JS add to cart does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement Ideas and suggestions
Projects
None yet
Development

No branches or pull requests

3 participants