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

Fix order line observer #1732

Open
wants to merge 3 commits into
base: 0.8
Choose a base branch
from

Conversation

theimerj
Copy link
Contributor

@theimerj theimerj commented May 8, 2024

Problem

This PR fixes the issue with adding non-eloquent purchasable data types to orders. It was possible to add only shipping type, which was hardcoded.

Solution

If we check if a class implements Purchasable contract instead of checking for type or calling instanceof on already resolved class, we have more general checking mechanism which opens the doors for custom non-eloquent purchasables.

Tests

  • Added tests which prove that any non-eloquent purchasables can be added to orders.

Copy link

vercel bot commented May 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lunar-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 8, 2024 3:41pm

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

Successfully merging this pull request may close these issues.

None yet

3 participants