public function WishlistItem::getPurchases in Commerce Wishlist 8.3
Gets the purchases.
Each object contains the order ID, quantity, and timestamp of a purchase.
Return value
\Drupal\commerce_wishlist\WishlistPurchase[] The purchases.
Overrides WishlistItemInterface::getPurchases
2 calls to WishlistItem::getPurchases()
- WishlistItem::getLastPurchasedTime in src/
Entity/ WishlistItem.php - Gets the timestamp of the last purchase.
- WishlistItem::getPurchasedQuantity in src/
Entity/ WishlistItem.php - Gets the purchased quantity.
File
- src/
Entity/ WishlistItem.php, line 177
Class
- WishlistItem
- Defines the wishlist item entity class.
Namespace
Drupal\commerce_wishlist\EntityCode
public function getPurchases() {
return $this
->get('purchases')
->getPurchases();
}