Commit graph

557 commits

Author SHA1 Message Date
Alex P
54d8a9b5a9
Use order currency instead of shop currency on order-pay page 2023-05-10 08:05:44 +03:00
dependabot[bot]
1d1b01ac1c
Bump json5 from 2.2.1 to 2.2.3 in /modules/ppcp-button
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 10:50:46 +00:00
dependabot[bot]
f5bc239293
Bump webpack from 5.74.0 to 5.76.0 in /modules/ppcp-button
Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.74.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-17 10:46:01 +00: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
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
9283c28bd1
Merge pull request #1234 from woocommerce/PCP-1483-price-suffix
Handle price suffix with price for product button check
2023-03-16 15:12:58 +01:00
dependabot[bot]
aaecb7a12f
Bump loader-utils from 2.0.2 to 2.0.4 in /modules/ppcp-button
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.2...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-14 10:35:25 +00:00
Alex P
3d096fb2ad
Handle price suffix with price for product button check 2023-03-07 16:20:01 +02:00
Emili Castells Guasch
098ec6f057 Merge branch 'trunk' into PCP-1462-order-pay-later 2023-03-03 10:46:50 +01: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
8950b9ca13
Render pay later message before buttons on order pay page 2023-02-27 12:03:32 +02:00
Alex P
d35fdea592
Fix pay later enabling
It should be enabled only when enabled on the Pay Later tab, also we disabling we can use `paylater` instead of `credit`
2023-02-27 12:02:47 +02:00
Alex P
68b13a480b
Fix script loading logic in pay-now check 2023-02-27 11:33:22 +02:00
Alex P
38a8473e57
Remove redundant method
pay later is not available for mini-cart, and even if we add it we should not implement this check with such confusing naming (location and context)
2023-02-26 15:03:41 +02: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
Emili Castells
e5c66a65a1
Merge branch 'trunk' into PCP-1430-validate-free-trial 2023-02-13 15:20:52 +01:00
emilicastells
568b809834
Move context logic to trait 2023-02-13 11:01:51 +01:00
Alex P
c3a874c96f
Merge branch 'trunk' into pcp-990-user-valdation 2023-02-10 15:22:49 +02:00
Emili Castells
31b05842fc
Merge pull request #1135 from woocommerce/pcp-956-free-trial-form-save
Save checkout form before free trial redirect
2023-02-10 12:32:09 +01:00
Emili Castells
4aab613925
Merge pull request #1157 from woocommerce/PCP-1138-recaptcha-validation
Set $_REQUEST before validation
2023-02-10 12:26:50 +01:00
Alex P
c5af5df056
Merge branch 'trunk' into PCP-1003-adv-validation 2023-02-10 11:55:44 +02:00
Alex P
09b6b411db
Call WC validation on free trial click 2023-02-07 15:29:53 +02:00
Alex P
838978fcf6
Retrieve validation errors from notices 2023-02-03 10:36:48 +02:00
Alex P
d6bd403b5a
Call calculate_shipping before validation 2023-02-03 10:35:38 +02:00
Alex P
b10f1a693a
Set $_REQUEST before validation 2023-02-02 15:26:28 +02:00
Alex P
6fc12a55a9
Make is_checkout()=true during validation to improve compatibility 2023-01-30 17:33:24 +02:00
Alex P
654d6d6da8
Validate new user creation 2023-01-26 12:34:07 +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
Narek Zakarian
eb080c9275
Merge branch 'trunk' into PCP-1083-update-standard-payments-tab-settings 2022-12-20 19:37:51 +04:00
Alex P
80428f1eb1
Execute WC validation only for buttons in checkout 2022-12-12 09:18:37 +02:00
Narek Zakarian
3398e46329
Allow general/default styling for smart buttons 2022-12-05 18:12:15 +04:00
Narek Zakarian
da07c3b5fa
Refactor smart button with new settings 2022-12-05 16:53:30 +04:00
Emili Castells
6a3f96a1e8
Merge pull request #1047 from woocommerce/pcp-1016-address-error
Fix shipping address validation
2022-12-01 11:58:09 +01:00
Emili Castells
67559a0492
Merge pull request #1035 from woocommerce/pcp-1036-fix-dcc-messages
Fix DCC error messages handling
2022-11-30 16:32:26 +01:00
Alex P
428d4f700b
Fix shipping address validation 2022-11-30 12:44:35 +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
Alex P
308ce11674
Set $_POST before validation 2022-11-23 10:34:19 +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