Emili Castells
1debc92453
Merge pull request #965 from woocommerce/pcp-456-aub-choice
...
Improve cart subscriptions check and "All products for subscriptions" compatibility
2023-03-03 10:44:03 +01:00
Alex P
6a0592f58b
Remove useless dcc check in cart
2023-02-15 16:52:16 +02:00
Alex P
5dd0931c0f
Hide cart buttons when intent changed
2023-02-15 16:50:34 +02:00
Alex P
4ae82b704a
Make SmartButton more reusable
2023-02-15 16:03:49 +02:00
Alex P
2b244133e1
Make error message list more consistent with WC
...
Now it should match the behavior of WC checkout.js more closely and avoid duplicated message lists (because we were always creating our own list ignoring WC).
Also removed the persist parameter. It does not seem to be used for anything useful, and we only set it inconsistently for some of the errors (remained from some old code).
I guess the idea could be to prevent genericError() from clearing previously added errors. Such if you call clear(), added some messages, but then some generic handler also triggered and called genericError(). If we really need such behavior, then we can simply check whether the list is empty. But it's probably not a good idea anyway because it can cause confusion if genericError() was a result of some other operation unrelated to the previous errors (e.g. tried another payment gateway).
2023-02-14 17:12:08 +02:00
Alex P
b98bed9147
Merge branch 'trunk' into pcp-456-aub-choice
2023-02-13 17:50:28 +02:00
Alex P
09b6b411db
Call WC validation on free trial click
2023-02-07 15:29:53 +02:00
Alex P
79f2c9a1fa
Save checkout form before free trial redirect
2023-01-25 09:42:31 +02:00
Alex P
d5f54abd94
Support grouped layout of sub mode plugin
2023-01-12 16:47:34 +02:00
Alex P
4bd39c9f95
Fix/refactor product button handling
2023-01-12 16:47:34 +02:00
Alex P
745c226f77
Hide product button when subscription mode chosen via plugin
2023-01-12 16:47:34 +02:00
Alex P
1da410a6da
Fix checkout error messages checks
2022-11-29 10:23:47 +02:00
Alex P
e9d83449d4
Fix DCC error messages handling
2022-11-29 10:02:10 +02:00
Emili Castells
93d33e5cad
Merge pull request #1004 from woocommerce/pcp-972-highlight-empty-fields
...
Trigger WC JS validation on button click to highlight empty fields
2022-11-22 11:31:21 +01:00
Alex P
78e076f0cb
Trigger WC JS validation on button click to highlight empty fields
2022-11-18 10:17:59 +02:00
Alex P
0bc23975a8
Use MutationObserver to show/hide variable product buttons
...
The price may get loaded later
2022-11-17 16:55:35 +02:00
Alex P
a0f6a8b700
Fix variable product price retrieval
2022-11-17 16:55:35 +02:00
Alex P
fca1f50878
Improve zero price check (handle NaN, null)
2022-11-17 16:55:35 +02:00
Alex P
38051eb617
Use PayPal button color for Pay Later when rendering separately
2022-11-16 09:23:08 +02:00
Alex P
edea76c9e4
Prevent Enter key submit for our non-standard button gateways
...
Otherwise pressing Enter triggers WC order process without e.g. completing payment via paypal popup, and results in failure with confusing error message.
2022-11-14 10:17:26 +02:00
Emili Castells
77e18ea2b3
Merge pull request #942 from woocommerce/pcp-817-validation
...
Execute server-side WC validation when clicking button
2022-11-02 16:31:30 +01:00
Narek Zakarian
469c3ce9c3
Merge branch 'trunk' into pcp-917-preview
...
# Conflicts:
# modules/ppcp-wc-gateway/resources/js/gateway-settings.js
# modules/ppcp-wc-gateway/services.php
# modules/ppcp-wc-gateway/src/Assets/SettingsPageAssets.php
# modules/ppcp-wc-gateway/src/WCGatewayModule.php
# tests/PHPUnit/WcGateway/Assets/SettingsPagesAssetsTest.php
2022-11-02 18:01:37 +04:00
Alex P
b3df9a5b47
Fix err.details check, show message if no details
...
The array check was wrong, resulting in no message shown and an error about empty string.
Also we should output .message if no .details, or at least a generic message if no .message too
2022-10-31 11:42:14 +02:00
Alex P
c99418d0bc
Remove unused imports
2022-10-27 12:14:39 +03:00
Alex P
91636a9dcc
Execute server-side WC validation when clicking button (order creation)
2022-10-27 09:55:25 +03:00
Alex P
3dde305cb4
Fix order creation error message handling in js
2022-10-27 09:11:35 +03:00
Alex P
9020c9b797
Use the same errorHandler
...
Otherwise old messages may get stuck
2022-10-27 09:09:45 +03:00
Alex P
ab618b200e
Add button preview in settings
2022-10-21 17:56:48 +03:00
Alex P
4ca9639fb1
Add CSS file for non-DCC rules
2022-10-20 13:13:42 +03:00
Alex P
57af25a197
Hide order button via class
2022-10-20 09:24:24 +03:00
Alex P
a766459ce1
Add FormData polyfil
...
Safari 10, Chrome 49, Firefox 43, ...
2022-09-12 11:42:58 +03:00
Alex P
86bd3886f0
Use appendChild for better compatibility
2022-09-12 10:23:53 +03:00
Alex P
23cb96e6f9
Explicitly send cookies in fetch
...
Not sent by default in old browsers
2022-09-09 16:28:58 +03:00
Alex P
5be88678e7
Use appendChild for better compatibility
...
For some reason Babel does not polyfill it
2022-09-09 11:20:23 +03:00
Alex P
0b4e42a30f
Refactor js error message creation, call jQuery animation only once
2022-08-10 10:09:06 +03:00
Alex P
a893a1de8e
Fallback to child nodes check in isAlreadyRendered when possible
...
Otherwise it breaks at least in cart when updating shipping.
2022-08-04 10:39:27 +03:00
Narek Zakarian
6b8014e5b1
Fix the JS file
2022-07-28 16:33:24 +04:00
Alex P
1049fda586
Merge branch 'trunk' into PCP-726-add-oxxo-apm-alternative-payment
2022-07-26 16:59:27 +03:00
Alex P
e55e2d9c81
Merge branch 'trunk' into pcp-697-separate-gateway
2022-07-26 15:28:27 +03:00
Alex P
8212605926
Make js validation error message like WC message
2022-07-22 11:48:53 +03:00
Alex P
88838ce5ca
Add fields to the basic js validation error message
2022-07-21 10:13:59 +03:00
Alex P
0c17c6b1de
Allow to choose one of 3 card billing data handling modes
...
also handle it in one place, no need to mess with payer parsing and JS
2022-07-20 17:28:55 +03:00
Alex P
1b1091051d
Render separately only if needed
...
to avoid breaking things. e.g. horizontal layout
2022-07-19 20:52:04 +03:00
Alex P
dc0bc3ba0a
Render all buttons separately to allow hiding sources in paypal gateway
2022-07-19 14:04:19 +03:00
Alex P
d4e8bd453c
Add card button gateway
2022-07-19 09:20:26 +03:00
Alex P
0ff11054f8
Refactor button renderer settings handling
2022-07-18 16:27:06 +03:00
Alex P
8c77258828
Add option for sending billing data
2022-07-18 16:24:53 +03:00
dinamiko
d1c4850c4d
Do not render custom oxxo button in checkout
2022-07-15 16:05:13 +02:00
dinamiko
07da639f9d
Add oxxo button to show hide gateway visibility
2022-07-14 12:27:53 +02:00
Emili Castells
b84d6b7f25
Merge pull request #686 from woocommerce/PCP-260-card-type-detection-not-working
...
Fix credit card detection.
2022-07-08 10:36:13 +02:00