Commit graph

73 commits

Author SHA1 Message Date
Philipp Stracker
3200b05e48
💄 Hide spinner when smart buttons are deactivated 2024-11-28 13:25:31 +01:00
Emili Castells Guasch
29e195e7f3 Ensure saved card payment use default payment flow for free trial subscriptions 2024-07-24 17:00:58 +02:00
Emili Castells Guasch
efbd36025d Add card payment token for free trial subscriptions (WIP) 2024-07-24 16:00:55 +02:00
Emili Castells Guasch
11105d913b Run eslint autofix 2024-07-12 12:58:34 +02:00
Philipp Stracker
25c5ef2e9e
New helper to monitor multistep checkout forms
The new script adds an interval to monitor the visibility of the “woocommerce-checkout-payment” element to initialize payment buttons with a delay, if needed.
2024-06-26 17:56:48 +02:00
Emili Castells Guasch
2bf3c14feb Do not execute current free trial flow if vault v3 enabled 2024-04-03 09:59:40 +02:00
Emili Castells Guasch
4e6eec462c Remove duplicated return 2024-03-19 12:05:43 +01:00
Emili Castells Guasch
0160e42909 Exclude PayPal subscriptions from free trial flow 2024-01-23 15:41:59 +01:00
Pedro Silva
a37594643a
Add Basic Checkout Validation and Early Checkout Validation to Card Fields 2023-12-22 16:02:00 +00:00
Pedro Silva
83a53ee223
Fix button margins on separate gateways 2023-12-15 17:11:16 +00:00
Alex P
064b6db726
Restore place order button if script loading failed 2023-11-22 16:58:25 +02:00
Emili Castells Guasch
32f7b4940b Inject either hosted fields or card fields depending on context 2023-11-20 13:23:10 +01:00
Pedro Silva
e2ca4cd0ae
Fix PayNowBootstrap parameters 2023-09-18 16:06:25 +01:00
Pedro Silva
2298a5fb1b
Merge branch 'trunk' into wip/apple-google-combined 2023-09-12 14:21:38 +01:00
Alex P
e5513d51de
Separate message rendering, fix some message rendering issues 2023-09-11 10:57:23 +03:00
Pedro Silva
93afeeba68
Add ButtonModuleWatcher
Adjustments for APM support
2023-08-29 15:26:59 +01:00
Pedro Silva
89288603c3
Fix in the Single Product load SingleProductBootstap when we have Messages even if buttons are not present 2023-08-09 15:03:54 +01:00
Emili Castells
02de8ada7f
Merge pull request #1536 from woocommerce/PCP-1871-one-page-checkout-causes-mini-cart-not-showing-the-pp-button-on-certain-pages
One-page checkout causes mini cart not showing the PP button on certain pages (1871)
2023-08-09 11:03:26 +02:00
Emili Castells
5675ebee48
Merge pull request #1530 from woocommerce/PCP-1896-missing-order-details
Improve WC order creation in webhook
2023-08-02 16:52:56 +02:00
Pedro Silva
59a68fb604
Add sanitize woocommerce_widget_cart_is_hidden filter for consistent values.
Remove context restrictions to mini-cart paypal buttons.
2023-07-24 17:09:45 +01:00
Alex P
8835f4b2a9
Always save form in checkout 2023-07-21 19:35:13 +03:00
Pedro Silva
84a362a7c5
Fix lint
Add throttling to simulate_cart ajax call
2023-07-20 17:51:48 +01:00
Pedro Silva
a0480e35bb
Add paypal widget builder 2023-07-20 14:19:18 +01:00
Pedro Silva
4e50d1d6ba
* Add paypal script reloading
* Add button reloading in cart and product page
* Add checking filters asynchronously
2023-07-20 08:02:15 +01:00
Alex P
ced0828c2d
Merge branch 'trunk' into PCP-1762-cart-paylater-amount 2023-07-11 10:44:22 +03:00
Emili Castells
17a346cfc9
Merge pull request #1485 from woocommerce/PCP-1788-filter-to-conditionally-block-the-pay-pal-buttons
Filter to conditionally block the PayPal buttons (1788)
2023-07-05 10:15:34 +02:00
Emili Castells
1d75e73b56
Merge pull request #1435 from woocommerce/PCP-860-apm
Improve handling of APMs when popup is not used or not redirected back to WC
2023-07-04 16:22:39 +02:00
Pedro Silva
6b03960de7
Refactor button renderer and filter woocommerce_paypal_payments_<context>_button_disabled 2023-07-03 17:35:01 +01:00
Pedro Silva
82828c2991
Add support for PayPal SmartButtons enable / disable
Rename functions
Remove invalid function arguments
2023-06-26 18:14:41 +01:00
Alex P
b6a85f0d13
Update Pay Later amount on the cart page when cart total changes 2023-06-16 11:39:20 +03:00
Alex P
46ea7621d3
Create wc order in approval webhook if missing 2023-06-14 12:44:06 +03:00
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
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
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
78e076f0cb
Trigger WC JS validation on button click to highlight empty fields 2022-11-18 10:17:59 +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
Alex P
9020c9b797 Use the same errorHandler
Otherwise old messages may get stuck
2022-10-27 09:09:45 +03:00
Alex P
57af25a197 Hide order button via class 2022-10-20 09:24:24 +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
Narek Zakarian
6b8014e5b1 Fix the JS file 2022-07-28 16:33:24 +04: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
d4e8bd453c Add card button gateway 2022-07-19 09:20:26 +03:00
Alex P
7f42fe1882 Show basic validation error only for required fields
Otherwise it may trigger on some sites when the field is no longer required but still marked as invalid, e.g. after switching to a country without required state
2022-07-01 11:43:11 +03:00
Alex P
be9c624264 Add filter allowing to disable the basic client-side validation
In case some conflicts occur.
2022-06-28 12:09:18 +03:00
Alex P
ba432b9705 Fix basic validation
Use :visible in both selectors, otherwise it may result in an unwanted error if something triggered  validation for hidden fields.
2022-06-20 18:27:04 +03:00