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(
4040 public function execute ()
4141 {
4242 $ 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 ()) {
4545 $ this ->messageManager ->addError (__ ('This condition no longer exists. ' ));
4646 $ this ->_redirect ('checkout/*/ ' );
4747 return ;
4848 }
4949
5050 try {
51- $ repository -> delete ();
51+ $ this -> agreementRepository -> delete ($ agreement );
5252 $ this ->messageManager ->addSuccess (__ ('You deleted the condition. ' ));
5353 $ this ->_redirect ('checkout/*/ ' );
5454 return ;
You can’t perform that action at this time.
0 commit comments