You are here

public function Wishlist::setKeepPurchasedItems in Commerce Wishlist 8.3

Sets whether items should remain in the wishlist once purchased.

Parameters

bool $keep_purchased_items: Whether items should remain in the wishlist once purchased.

Return value

$this

Overrides WishlistInterface::setKeepPurchasedItems

File

src/Entity/Wishlist.php, line 292

Class

Wishlist
Defines the wishlist entity class.

Namespace

Drupal\commerce_wishlist\Entity

Code

public function setKeepPurchasedItems($keep_purchased_items) {
  $this
    ->set('keep_purchased_items', (bool) $keep_purchased_items);
  return $this;
}