File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ class DataProvider extends \Magento\Ui\DataProvider\ModifierPoolDataProvider
30
30
protected $ loadedData ;
31
31
32
32
/**
33
+ * Constructor
34
+ *
33
35
* @param string $name
34
36
* @param string $primaryFieldName
35
37
* @param string $requestFieldName
Original file line number Diff line number Diff line change @@ -26,16 +26,21 @@ class Instructions extends \Magento\Payment\Block\Info
26
26
protected $ _template = 'Magento_Payment::info/instructions.phtml ' ;
27
27
28
28
/**
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).
31
30
*
32
31
* @return string
33
32
*/
34
33
public function getInstructions ()
35
34
{
36
35
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 ) : '' ;
39
44
}
40
45
return $ this ->_instructions ;
41
46
}
You can’t perform that action at this time.
0 commit comments