File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
app/code/Magento/CheckoutAgreements/Controller/Adminhtml/Agreement Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,15 @@ public function __construct(
40
40
public function execute ()
41
41
{
42
42
$ id = (int )$ this ->getRequest ()->getParam ('id ' );
43
- $ repository = $ this ->agreementRepository ->get ($ id );
44
- if (!$ repository ->getAgreementId ()) {
43
+ $ agreement = $ this ->agreementRepository ->get ($ id );
44
+ if (!$ agreement ->getAgreementId ()) {
45
45
$ this ->messageManager ->addError (__ ('This condition no longer exists. ' ));
46
46
$ this ->_redirect ('checkout/*/ ' );
47
47
return ;
48
48
}
49
49
50
50
try {
51
- $ repository -> delete ();
51
+ $ this -> agreementRepository -> delete ($ agreement );
52
52
$ this ->messageManager ->addSuccess (__ ('You deleted the condition. ' ));
53
53
$ this ->_redirect ('checkout/*/ ' );
54
54
return ;
You can’t perform that action at this time.
0 commit comments