You are here

function commerce_wishlist_delete in Commerce Wishlist 7

Access callback: Delete the wishlist product

1 string reference to 'commerce_wishlist_delete'
commerce_wishlist_menu in ./commerce_wishlist.module
Implements hook_menu().

File

./commerce_wishlist.module, line 271
Provides the wishlist for use in Drupal Commerce.

Code

function commerce_wishlist_delete($user, $wishlist_id) {
  db_delete('commerce_wishlist')
    ->condition('wishlist_id', $wishlist_id)
    ->execute();
  drupal_set_message(t('The product has been deleted from your wishlist.'));
  drupal_goto('user/' . $user->uid . '/wishlist');
}