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 d117cbb commit 53eebdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controller/Frontend/Subscription/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ public function __clone()
*/
public function cancel( string $id ) : \Aimeos\MShop\Subscription\Item\Iface
{
$item = $this->manager->get( $id );
$item = $this->object()->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 53eebdc

Please sign in to comment.