Skip to content

Commit

Permalink
Added the findBySku() method to the Product interface
Browse files Browse the repository at this point in the history
  • Loading branch information
fulopattila122 committed Apr 2, 2024
1 parent 2a38282 commit d9793f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Product/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Changed minimal Enum requirement to v4.2
- Added the `Stockable` interface to the Product Model
- Added the `backorder` field to products
- BC: Added the `findBySku()` method to the `Product` interface

## 3.x Series

Expand Down
2 changes: 2 additions & 0 deletions src/Product/Contracts/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ public function isActive(): bool;
* Returns the title of the product. If no `title` was given, returns the `name` of the product
*/
public function title(): string;

public static function findBySku(string $sku): ?Product;
}

0 comments on commit d9793f5

Please sign in to comment.