From c318d40a24638955cf6223801f792eea23531452 Mon Sep 17 00:00:00 2001 From: "Gurzhyi, Andrii" Date: Sun, 1 Nov 2015 20:36:46 +0200 Subject: [PATCH] MAGETWO-44600: Incorrect display of Void button for order placed within Braintree - Fixed bug --- app/code/Magento/Braintree/Model/PaymentMethod.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Braintree/Model/PaymentMethod.php b/app/code/Magento/Braintree/Model/PaymentMethod.php index 8e14ed191e350..e4a0313d15ce1 100644 --- a/app/code/Magento/Braintree/Model/PaymentMethod.php +++ b/app/code/Magento/Braintree/Model/PaymentMethod.php @@ -916,8 +916,8 @@ protected function processSuccessResult( */ public function canVoid() { - if (($order = $this->_registry->registry('current_order')) - && $order->getId() && $order->hasInvoices() ) { + if ((($order = $this->_registry->registry('current_order')) + && $order->getId() && $order->hasInvoices()) || $this->_registry->registry('current_invoice')) { return false; } return $this->_canVoid;