Skip to content

Commit 6bf4971

Browse files
karyna-tandrewbess
authored andcommitted
#34505: improve fixes
1 parent 1c98cf8 commit 6bf4971

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

app/code/Magento/Cms/Model/Block/DataProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider
3030
protected $loadedData;
3131

3232
/**
33+
* Constructor
34+
*
3335
* @param string $name
3436
* @param string $primaryFieldName
3537
* @param string $requestFieldName

app/code/Magento/Payment/Block/Info/Instructions.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,21 @@ class Instructions extends \Magento\Payment\Block\Info
2626
protected $_template = 'Magento_Payment::info/instructions.phtml';
2727

2828
/**
29-
* Get instructions text from order payment
30-
* (or from config, if instructions are missed in payment)
29+
* Get instructions text from order payment (or from config, if instructions are missed in payment).
3130
*
3231
* @return string
3332
*/
3433
public function getInstructions()
3534
{
3635
if ($this->_instructions === null) {
37-
$this->_instructions = $this->getInfo()->getAdditionalInformation('instructions')
38-
?: trim($this->getMethod()->getConfigData('instructions') ?? '');
36+
$additionalInstructions = $this->getInfo()->getAdditionalInformation('instructions');
37+
if ($additionalInstructions) {
38+
$this->_instructions = $additionalInstructions;
39+
return $this->_instructions;
40+
}
41+
42+
$instructions = $this->getMethod()->getConfigData('instructions');
43+
$this->_instructions = $instructions !== null ? trim($instructions) : '';
3944
}
4045
return $this->_instructions;
4146
}

0 commit comments

Comments
 (0)