Skip to content

Allow purchasing products that are out of stock#3832

Merged
lukeholder merged 20 commits into5.3from
feature/back-order
Jan 22, 2025
Merged

Allow purchasing products that are out of stock#3832
lukeholder merged 20 commits into5.3from
feature/back-order

Conversation

@lukeholder
Copy link
Member

@lukeholder lukeholder commented Dec 31, 2024

Description

  • Added craft\commerce\base\Purchasable::hasInventory().
  • Added craft\commerce\elements\Purchasable::$allowOutOfStockPurchases.
  • Added craft\commerce\elements\Purchasable::getIsOutOfStockPurchasingAllowed().
  • Added craft\commerce\events\PurchasableOutOfStockPurchasesAllowedEvent.
  • Added craft\commerce\services\Purchasables::EVENT_PURCHASABLE_OUT_OF_STOCK_PURCHASES_ALLOWED.
  • Added craft\commerce\services\Purchasables::isPurchasableOutOfStockPurchasingAllowed().

Related issues/discussion

#3649

@nfourtythree nfourtythree changed the base branch from 5.x to 5.3 December 31, 2024 10:50
@lukeholder lukeholder marked this pull request as ready for review January 3, 2025 05:13
@lukeholder lukeholder requested a review from a team as a code owner January 3, 2025 05:13
@lukeholder lukeholder mentioned this pull request Jan 8, 2025
9 tasks
@lukeholder lukeholder merged commit 2c93b72 into 5.3 Jan 22, 2025
9 checks passed
@lukeholder lukeholder deleted the feature/back-order branch January 22, 2025 14:11
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.

2 participants