Skip to content

Commit

Permalink
Check user before canceling subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jun 11, 2024
1 parent 02d2f53 commit 7c93139
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function __clone()
*/
public function cancel( string $id ) : \Aimeos\MShop\Subscription\Item\Iface
{
$item = $this->manager->get( $id );
$item = $this->getObject()->get( $id );
$item = $item->setDateEnd( $item->getDateNext() ?: date( 'Y-m-d' ) )
->setReason( \Aimeos\MShop\Subscription\Item\Iface::REASON_CANCEL );

Expand Down

0 comments on commit 7c93139

Please sign in to comment.