File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
app/code/Magento/Captcha/Block/Checkout Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Copyright 2025 Adobe.
4+ * All Rights Reserved.
5+ */
6+
7+ declare (strict_types=1 );
8+ namespace Magento \Captcha \Block \Checkout ;
9+
10+ use Magento \Checkout \Block \Checkout \LayoutProcessorInterface ;
11+ use Magento \Captcha \Helper \Data as HelperCaptcha ;
12+
13+ class LayoutProcessor implements LayoutProcessorInterface
14+ {
15+ /**
16+ * @param HelperCaptcha $helper
17+ */
18+ public function __construct (
19+ private readonly HelperCaptcha $ helper
20+ ) {
21+ }
22+
23+ /**
24+ * Process jsLayout of checkout page
25+ *
26+ * @param array $jsLayout
27+ * @return array
28+ */
29+ public function process ($ jsLayout ): array
30+ {
31+ if ($ this ->helper ->getConfig ('enable ' )) {
32+ $ jsLayout ['components ' ]['authenticationPopup ' ]['children ' ]['captcha ' ] = [
33+ 'component ' => 'Magento_Captcha/js/view/checkout/loginCaptcha ' ,
34+ 'displayArea ' => 'additional-login-form-fields ' ,
35+ 'formId ' => 'user_login ' ,
36+ 'configSource ' => 'checkout '
37+ ];
38+ }
39+ return $ jsLayout ;
40+ }
41+ }
You can’t perform that action at this time.
0 commit comments