File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
app/code/Magento/Checkout/Model/Layout Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,11 @@ class DepersonalizePlugin
28
28
*/
29
29
private $ checkoutSession ;
30
30
31
+ /**
32
+ * @var int
33
+ */
34
+ private $ quoteId ;
35
+
31
36
/**
32
37
* @param DepersonalizeChecker $depersonalizeChecker
33
38
* @param CheckoutSession $checkoutSession
@@ -41,6 +46,19 @@ public function __construct(
41
46
$ this ->checkoutSession = $ checkoutSession ;
42
47
}
43
48
49
+ /**
50
+ * Resolve quote data if the depersonalization is needed.
51
+ *
52
+ * @param LayoutInterface $subject
53
+ * @return void
54
+ */
55
+ public function beforeGenerateXml (LayoutInterface $ subject )
56
+ {
57
+ if ($ this ->depersonalizeChecker ->checkIfDepersonalize ($ subject )) {
58
+ $ this ->quoteId = $ this ->checkoutSession ->getQuoteId ();
59
+ }
60
+ }
61
+
44
62
/**
45
63
* Change sensitive customer data if the depersonalization is needed.
46
64
*
@@ -51,6 +69,7 @@ public function afterGenerateElements(LayoutInterface $subject)
51
69
{
52
70
if ($ this ->depersonalizeChecker ->checkIfDepersonalize ($ subject )) {
53
71
$ this ->checkoutSession ->clearStorage ();
72
+ $ this ->checkoutSession ->setQuoteId ($ this ->quoteId );
54
73
}
55
74
}
56
75
}
You can’t perform that action at this time.
0 commit comments