original_string: public function delete(array $data)
      {
          $result = array();
          $this->hook->attach('wishlist.delete.product.before', $data, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          if (!$this->wishlist->delete($data)) {
              return $this->getResultError();
          }
  
          $result = $this->getResultDelete($data);
          $this->hook->attach('wishlist.delete.product.after', $data, $result, $this);
          return (array) $result;
      }
code: public function delete(array $data)
      {
          $result = array();
          $this->hook->attach('wishlist.delete.product.before', $data, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          if (!$this->wishlist->delete($data)) {
              return $this->getResultError();
          }
  
          $result = $this->getResultDelete($data);
          $this->hook->attach('wishlist.delete.product.after', $data, $result, $this);
          return (array) $result;
      }
code_tokens: public function delete ( array $ data ) { $ result = array ( ) ; $ this -> hook -> attach ( 'wishlist.delete.product.before' , $ data , $ result , $ this ) ; if ( ! empty ( $ result ) ) { return ( array ) $ result ; } if ( ! $ this -> wishlist -> delete ( $ data ) ) { return $ this -> getResultError ( ) ; } $ result = $ this -> getResultDelete ( $ data ) ; $ this -> hook -> attach ( 'wishlist.delete.product.after' , $ data , $ result , $ this ) ; return ( array ) $ result ; }
docstring: Delete a product from the wishlist
  @param array $data
  @return array
docstring_tokens: Delete a product from the wishlist