Commit graph

537 commits

Author SHA1 Message Date
Alex P
2b566fcf44
Merge branch 'trunk' into PCP-860-apm 2023-06-27 15:54:06 +03:00
Emili Castells
715e9bcf17
Merge pull request #1384 from woocommerce/PCP-1700-js-error-event
Trigger WC checkout_error event
2023-06-27 11:40:01 +02: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
Pedro Silva
adf7a2e297
Remove unnecessary code 2023-06-26 11:55:30 +01:00
Pedro Silva
75bf98c174
Add hide / show conditions on SingleProduct Buttons for when they shouldn't be rendered.
Refactor MessageRenderer not to reload when it has no changes.
2023-06-23 15:49:08 +01:00
Pedro Silva
587e065fba
Refactored button display logic
Replaced show / hide buttons mode with enable / disable buttons mode
2023-06-23 08:23:11 +01:00
Emili Castells Guasch
06bfe33db2 Working on subscriptions (WIP) 2023-06-21 15:42:18 +02:00
Emili Castells Guasch
09c7537e48 Hide non updatable form fields if subscription product connected to PayPal 2023-06-16 16:11:45 +02: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 Guasch
87325585f1 Fix cart button render conditional 2023-06-13 11:46:56 +02:00
Emili Castells Guasch
f9ed01e5c4 Fix single product button render conditional 2023-06-13 11:33:24 +02:00
Emili Castells Guasch
5082a0d17b Do not render PayPal subscription button if no plan is connected 2023-06-07 12:50:18 +02:00
Alex P
04bc1ba37f
Fix js error 2023-06-06 15:33:13 +03:00
Alex P
729251495f
Handle empty acdc fields 2023-06-06 15:33:13 +03:00
Alex P
bee2a8d5ba
Do not send whole order in create order response 2023-05-31 16:18:34 +03:00
Alex P
0322aac244
Trigger WC checkout_error event
Triggering WC checkout_error event for our validation, similarly to the WC submit ajax handler.
2023-05-17 17:21:24 +03:00
Emili Castells Guasch
69da3f78ed Override hosted fields configurtation when PayPal subscriptions is enabled 2023-05-09 11:42:31 +02:00
Emili Castells Guasch
29a21d214f Merge trunk 2023-04-17 14:16:53 +02:00
Alex P
3c557907f2
Refresh checkout totals after validation if needed
Refreshing the totals the same way as WC does this.
2023-04-04 11:35:16 +03:00
Emili Castells Guasch
610ba3e935 Add subscription from cart page 2023-03-30 14:47:28 +02:00
Emili Castells Guasch
e0228dbad3 Add subscriptions to single product page (WIP) 2023-03-29 16:34:30 +02:00
Emili Castells Guasch
1ed8f23efd Fix merge conflicts 2023-03-29 13:03:20 +02:00
Emili Castells Guasch
8d97954f42 Add content type json to all fetch ajax endpoints 2023-03-22 17:26:58 +01:00
Emili Castells Guasch
5ceb39c9e0 Fix code style 2023-03-22 17:00:16 +01:00
Emili Castells Guasch
df2c215ec9 Add content type json to all fetch ajax endpoints 2023-03-22 16:53:26 +01:00
Emili Castells Guasch
01ab5d6003 Add subscriptions api logic to Single product (WIP) 2023-03-20 11:58:34 +01:00
Emili Castells Guasch
baee53e90f Fix merge conflicts 2023-03-17 09:20:51 +01:00
Alex P
3d096fb2ad
Handle price suffix with price for product button check 2023-03-07 16:20:01 +02: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
Emili Castells Guasch
c1d7d30f04 Fix merge conflicts 2023-02-28 11:07: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
emilicastells
72eb713fd4
Add logic to enable/disable PayPal subscriptions feature 2023-01-16 12:37:16 +01: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
emilicastells
7774a5e8b0
Integrate PayPal Subscriptions (WIP) 2023-01-05 14:53:23 +01: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