You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve infinite render loop and tokenization checkbox issues
- Fix infinite render loop in monei-cc-component by memoizing moneiData and config objects
- Fix dependency arrays to use specific properties instead of objects
- Fix tokenization checkbox validation using FILTER_VALIDATE_BOOLEAN instead of isset()
- Add proper URL construction for Bizum/PayPal/Apple Pay redirect flows
- Add onCheckoutSuccess handler for Apple/Google Pay component mode
- Add user login check before saving payment tokens
- Remove debug logging from component and redirect hooks
- Reorder settings fields to group style options at bottom
Resolves issues with:
- React components rendering 70,000+ times
- Cards being saved when checkbox unchecked
- Redirect URLs missing query parameters
'description' => __( 'Configure in JSON format the style of the Apple Pay / Google Pay component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#paymentrequest-options" target="_blank">MONEI Payment Request Style</a>',
38
-
'default' => '{"height": "50px"}',
39
-
'css' => 'min-height: 80px;',
40
-
),
41
34
'title' => array(
42
35
'title' => __( 'Title', 'monei' ),
43
36
'type' => 'text',
@@ -61,5 +54,12 @@
61
54
'description' => __( 'Hide payment method logo in the checkout.', 'monei' ),
'description' => __( 'Configure in JSON format the style of the Apple Pay / Google Pay component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#paymentrequest-options" target="_blank">MONEI Payment Request Style</a>',
Copy file name to clipboardExpand all lines: includes/admin/monei-bizum-settings.php
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -38,20 +38,6 @@
38
38
'default' => 'no',
39
39
'description' => sprintf( __( 'If disabled the Bizum button will be rendered directly on the checkout page. It is recommended to enable redirection in cases where Bizum payments do not function correctly.', 'monei' ) ),
40
40
),
41
-
'description' => array(
42
-
'title' => __( 'Description', 'monei' ),
43
-
'type' => 'textarea',
44
-
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
45
-
'default' => __( 'You will be redirected to Bizum to complete the payment. Powered by MONEI.', 'monei' ),
46
-
'class' => 'monei-bizum-description-field',
47
-
),
48
-
'bizum_style' => array(
49
-
'title' => __( 'Bizum Style', 'monei' ),
50
-
'type' => 'textarea',
51
-
'description' => __( 'Configure in JSON format the style of the Bizum component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#bizum-options" target="_blank">MONEI Bizum Style</a>',
52
-
'default' => '{"height": "50px"}',
53
-
'css' => 'min-height: 80px;',
54
-
),
55
41
'title' => array(
56
42
'title' => __( 'Title', 'monei' ),
57
43
'type' => 'text',
@@ -75,5 +61,19 @@
75
61
'description' => __( 'Hide payment method logo in the checkout.', 'monei' ),
76
62
'desc_tip' => true,
77
63
),
64
+
'description' => array(
65
+
'title' => __( 'Description', 'monei' ),
66
+
'type' => 'textarea',
67
+
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
68
+
'default' => __( 'You will be redirected to Bizum to complete the payment. Powered by MONEI.', 'monei' ),
69
+
'class' => 'monei-bizum-description-field',
70
+
),
71
+
'bizum_style' => array(
72
+
'title' => __( 'Bizum Style', 'monei' ),
73
+
'type' => 'textarea',
74
+
'description' => __( 'Configure in JSON format the style of the Bizum component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#bizum-options" target="_blank">MONEI Bizum Style</a>',
Copy file name to clipboardExpand all lines: includes/admin/monei-cc-settings.php
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -38,20 +38,6 @@
38
38
'default' => 'no',
39
39
'description' => sprintf( __( 'If disabled the credit card input will be rendered directly on the checkout page.', 'monei' ) ),
40
40
),
41
-
'description' => array(
42
-
'title' => __( 'Description', 'monei' ),
43
-
'type' => 'textarea',
44
-
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
45
-
'default' => __( 'You will be redirected to the payment page to complete the payment. Powered by MONEI.', 'monei' ),
46
-
'class' => 'monei-cc-description-field',
47
-
),
48
-
'card_input_style' => array(
49
-
'title' => __( 'Card Input Style', 'monei' ),
50
-
'type' => 'textarea',
51
-
'description' => __( 'Configure in JSON format the style of the Card Input component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#cardinput-style-object" target="_blank">MONEI Card Input Style</a>',
'description' => __( 'Hide payment method logo in the checkout.', 'monei' ),
76
62
'desc_tip' => true,
77
63
),
64
+
'description' => array(
65
+
'title' => __( 'Description', 'monei' ),
66
+
'type' => 'textarea',
67
+
'description' => __( 'This description is only displayed when using redirect mode. It will be shown to customers before they are redirected to the payment page.', 'monei' ),
68
+
'default' => __( 'You will be redirected to the payment page to complete the payment. Powered by MONEI.', 'monei' ),
69
+
'class' => 'monei-cc-description-field',
70
+
),
71
+
'card_input_style' => array(
72
+
'title' => __( 'Card Input Style', 'monei' ),
73
+
'type' => 'textarea',
74
+
'description' => __( 'Configure in JSON format the style of the Card Input component. Documentation: ', 'monei' ) . '<a href="https://docs.monei.com/docs/monei-js/reference/#cardinput-style-object" target="_blank">MONEI Card Input Style</a>',
0 commit comments