Commit graph

6945 commits

Author SHA1 Message Date
Philipp Stracker
05b4baec15
🐛 Fix the partner-referral payload to pass tests 2025-03-05 17:27:39 +01:00
Philipp Stracker
8ec852952f
🔀 Merge branch 'trunk’
# Conflicts:
#	modules/ppcp-settings/resources/js/data/common/hooks.js
2025-03-05 17:01:52 +01:00
Philipp Stracker
84dd8a3dec
👔 Wire up JS onboarding-flags with PHP back-end 2025-03-05 16:57:51 +01:00
Philipp Stracker
57c2287739
👔 Implement the new “use-cards” onboarding flag 2025-03-05 16:52:37 +01:00
Philipp Stracker
581c28edac
👔 Implement the new subscription-flag 2025-03-05 16:39:03 +01:00
Narek Zakarian
49a5f855b0
Fix the CS 2025-03-05 19:24:33 +04:00
Narek Zakarian
ed5077347e
Fix the Psalm 2025-03-05 19:10:43 +04:00
Philipp Stracker
db1fc28d47
👔 Update the product generation logic
Vaulting is only available to business sellers
2025-03-05 16:01:42 +01:00
Philipp Stracker
51fd3b3707
🧪 Update JS tests to meet new requirements 2025-03-05 16:00:52 +01:00
Narek Zakarian
e46039fe63
Unset the BCDC button if merchant is eligible for ACDC. 2025-03-05 19:00:11 +04:00
Narek Zakarian
f83449090b
Allow to filter the disabled funding sources 2025-03-05 18:59:41 +04:00
Philipp Stracker
54046cd307
♻️ Restore correct order of payload creation
The token must be added after the last filter, to maintain backwards compatibility!
2025-03-05 15:27:43 +01:00
Philipp Stracker
8cb66440d3
🎨 Reduce nesting-depth of code 2025-03-05 15:23:25 +01:00
Philipp Stracker
29ad91f515
💡 Ad deprecation comment to a property 2025-03-05 15:19:37 +01:00
Philipp Stracker
f014539a95
♻️ Remove “append-token” method
We want to build the full payload, including the token, in the `::data()` method.
2025-03-05 15:14:52 +01:00
Philipp Stracker
1c17e7199f
♻️ Replace builder pattern with function arguments
Instead of using `with_products()` to generate a new object, we now simply pass the products array to the data() function. This adds a lot more transparency to the process and makes the code easier to read and maintain.

The builder pattern is only implemented in 2 files, and both are rarely used, which makes it an overly complex solution for a simple task (in this project).
2025-03-05 14:59:55 +01:00
Philipp Stracker
112ab6485d
🎨 Fix code style 2025-03-05 14:56:31 +01:00
carmenmaymo
334f6a74e2
Add __meta key to allowed in reducer to prevent warning 2025-03-05 13:40:09 +01:00
carmenmaymo
50e83cce5c
Check if sandboxSwitchElement isset to prevent error 2025-03-05 13:39:34 +01:00
Philipp Stracker
81d1925fef
🎨 Consolidate recurring condition into a const 2025-03-05 11:32:35 +01:00
Philipp Stracker
3ff64d841a
️ Leverage memoization for selector 2025-03-05 11:32:06 +01:00
Daniel Dudzic
162ec8d0f9
Merge branch 'PCP-4273-bcdc-button-is-visible-on-classic-checkout-and-on-express-checkout-even-when-acdc-is-enabled-or-disabled' of github.com:woocommerce/woocommerce-paypal-payments into PCP-4276-fastlane-is-broken-on-frontend 2025-03-04 17:52:59 +01:00
Narek Zakarian
878bf393d7
Directly check if gateway is enabled 2025-03-04 20:34:17 +04:00
Narek Zakarian
ced161559f
Directly check if gateway is enabled 2025-03-04 20:33:57 +04:00
Daniel Dudzic
e7251780f8
Merge branch 'PCP-4273-bcdc-button-is-visible-on-classic-checkout-and-on-express-checkout-even-when-acdc-is-enabled-or-disabled' of github.com:woocommerce/woocommerce-paypal-payments into PCP-4276-fastlane-is-broken-on-frontend 2025-03-04 15:38:55 +01:00
Narek Zakarian
6e928acfed
Use the new helper for payment methods 2025-03-04 18:33:09 +04:00
Narek Zakarian
ddb80b5a89
Add services for a new map helper 2025-03-04 18:32:54 +04:00
Narek Zakarian
8e0bc6f2d2
Create a helper for mapping the payment methods 2025-03-04 18:32:20 +04:00
Emili Castells
45f6aa9ac6
Merge pull request #3176 from woocommerce/PCP-4258-make-the-pay-later-payment-method-dependent-on-save-pay-pal-and-venmo-setting-being-disabled
Add support for setting-based payment method dependencies (4258)
2025-03-04 13:57:35 +01:00
Philipp Stracker
27f4ab442f
♻️ Move PayPal product names to config file
Because constants are better than magic strings
2025-03-03 15:27:53 +01:00
Philipp Stracker
748c7f4d10
🔀 Merge branch 'trunk' 2025-03-03 15:23:05 +01:00
Daniel Dudzic
68785683e3
Clean up the usePaymentDependencyState.js hook 2025-03-03 14:53:04 +01:00
Daniel Dudzic
85c227aabd
Remove code comment 2025-03-03 14:30:47 +01:00
Daniel Dudzic
8e9337dae9
Merge branch 'trunk' of github.com:woocommerce/woocommerce-paypal-payments into PCP-4258-make-the-pay-later-payment-method-dependent-on-save-pay-pal-and-venmo-setting-being-disabled 2025-03-03 14:26:16 +01:00
Daniel Dudzic
e8be67d286
Add support for setting-based payment method dependencies 2025-03-03 14:26:08 +01:00
Emili Castells Guasch
4f1e6e4f0d Ensure payment method is enabled before loading scripts 2025-02-28 18:08:18 +01:00
Narek Zakarian
7dc2fef1da
If the new settings module is not enabled, return null
This will force the `Settings` old class to always fallback to the old settings value
2025-02-28 19:48:03 +04:00
Narek Zakarian
c8d9a142ea
Pass a boolean to the map to check if the new settings module is enabled 2025-02-28 19:47:03 +04:00
Emili Castells
4e000e2ae9
Merge pull request #3167 from woocommerce/PCP-4261-uncheck-item-when-disabled-for-payment-methods
Do not render the button when it is disabled from Payment Methods (4261)
2025-02-28 15:18:49 +01:00
Narek Zakarian
cf30631c19
Fix the tests 2025-02-28 16:24:41 +04:00
Narek Zakarian
88c0ce6ee3
Fix the tests 2025-02-28 16:10:22 +04:00
Narek Zakarian
860372fb7c
Use the constants from the gateways instead of hard-coding the names 2025-02-28 15:53:32 +04:00
Narek Zakarian
d83b57b887
Check if the button is enabled before rendering on block pages 2025-02-28 15:51:39 +04:00
Narek Zakarian
c38338f05d
just return true when is the old settings 2025-02-28 15:50:31 +04:00
Narek Zakarian
ca870ecf6f
Use the Payment setting model to check if the gateway is enabled.
Once the new settings module is permanently enabled, this model can be passed as a dependency to the styling helper class. For now, we must pass it this way to avoid errors when the new settings module is disabled.
2025-02-28 15:49:42 +04:00
Emili Castells
63c38c1167
Merge pull request #3043 from woocommerce/PCP-3904-show-new-settings-ui-to-new-merchants-only
Show new settings UI to new merchants only (3904)
2025-02-28 11:47:09 +01:00
Philipp Stracker
f2f9c1ebcd
Implement the “useCardPayments” option 2025-02-27 19:21:29 +01:00
Philipp Stracker
bfa101ac24
🧪 Add failing tests
Expect to receive the decission flag “Use Card Payments” that was made during onboarding.
2025-02-27 19:21:09 +01:00
Philipp Stracker
39abc3a646
Add the expected onboarding “options” value
TDD: Implement the expected return value to resolve the failing tests
2025-02-27 19:03:31 +01:00
Philipp Stracker
53c7488180
♻️ Clarify variable names 2025-02-27 19:02:19 +01:00