Problem/Motivation
Wishlist API allows to set the Shipping Profile related to the wishlist. However, it is not possible to unset the value, given that method only allows to pass ProfileInterface objects as parameters.
Steps to reproduce
Create a Wishlist and a Profile
Set the profile $wishlist->setShippingProfile($profile)->save()
Try to unset the profile $wishlist->setShippingProfile(NULL)->save()
Exceptions thrown: TypeError: Drupal\commerce_wishlist\Entity\Wishlist::setShippingProfile(): Argument #1 ($profile) must be of type Drupal\profile\Entity\ProfileInterface
Proposed resolution
Allow to pass NULL as parameter to unset the profile.
Issue fork commerce_wishlist-3386991
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
plopescUpdate Status