Skip to content

Commit c3670c6

Browse files
committed
Fixed Issue: The unwanted form fields do not remove on Sales Order Edit page.
1 parent 4a8020d commit c3670c6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Helper/Data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,11 @@ public function isCustomerEditAdminPage()
4343
* Check page type
4444
* @return bool
4545
*/
46-
public function isOrderCreationAdminPage()
46+
public function isSalesOrderFormAdminPage()
4747
{
4848
return $this->_request->getFullActionName() === 'sales_order_create_index'
49-
|| $this->_request->getFullActionName() === 'sales_order_create_loadBlock';
49+
|| $this->_request->getFullActionName() === 'sales_order_create_loadBlock'
50+
|| $this->_request->getFullActionName() === 'sales_order_edit_index';
5051
}
5152

5253
/**

Plugin/Model/Metadata/FormPlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct(
3535
*/
3636
public function afterGetAttributes(Form $subject, $result)
3737
{
38-
if ($this->_dataHelper->isOrderCreationAdminPage() && $this->_dataHelper->isEnabled() && is_array($result)) {
38+
if ($this->_dataHelper->isSalesOrderFormAdminPage() && $this->_dataHelper->isEnabled() && is_array($result)) {
3939
foreach ($this->_dataHelper->getCustomerAddressAttributeArray() as $field) {
4040
if (array_key_exists($field, $result)) {
4141
unset($result[$field]);

0 commit comments

Comments
 (0)