Commit graph

27 commits

Author SHA1 Message Date
Alex P.
65d958254d
Use explicit nullable types 2025-07-15 15:53:23 +03:00
Emili Castells Guasch
6e6f1a1805
Add vaulting product and capabilities 2025-05-27 12:48:00 +02:00
Philipp Stracker
ca93ce4b83
♻️ Simplify API payload generation
Reason: Makes unit tests more stable, as the `for_country_currency()` helper is always called exactly once, regardless of specified arguments.
2025-05-23 18:04:33 +02:00
Emili Castells Guasch
24aa99fb80
Do not remove vaulting capabilities when subscriptions is not selecting when onboarding 2025-05-23 12:42:33 +02:00
Emili Castells
3b48f8a70d
Merge pull request #3242 from woocommerce/PCP-4385-failed-to-fetch-onboarding-url-error-when-onboarding-with-no-rt-merchant-and-selecting-subscriptions-product
Do not add the capabilities if is not eligible for ACDC (4385)
2025-03-24 09:31:30 +01:00
Narek Zakarian
a40b7bc139
Do not add the capabilities if is not eligible for ACDC 2025-03-19 16:33:37 +04:00
Philipp Stracker
b9d7574418
💡 Add/update comments related to #legacy-ui todos 2025-03-14 15:30:41 +01:00
Narek Zakarian
b09fb7a64a
Always include the BILLING_AGREEMENT with subscriptions 2025-03-11 19:06:11 +04:00
Philipp Stracker
05b4baec15
🐛 Fix the partner-referral payload to pass tests 2025-03-05 17:27:39 +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
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
Pedro Silva
35fbe42733
Refactor WooCommerce\PayPalCommerce\Onboarding\Exception\RuntimeException to \RuntimeException
Refactor to use add_query_arg in append_onboarding_token
2023-07-12 14:57:57 +01:00
Pedro Silva
96eae6c690
Add security to the onboarding return URL. 2023-07-07 18:44:53 +01:00
Alex P
bd243cad89 Remove WC logo during onboarding 2022-10-03 12:40:07 +03:00
dinamiko
7d6146bfe9 Add tracking scope to referral api 2022-05-16 16:54:05 +02:00
dinamiko
e9cf818799 Fix phpcd (WIP) 2022-04-14 17:17:56 +02:00
dinamiko
61973a6223 Set pui partner referrals config through filter 2022-03-11 15:21:48 +01:00
dinamiko
9dfa15acfc Add PAY_UPON_INVOICE into capabiliies (WIP) 2022-03-11 12:33:49 +01:00
Alex P
fc89021df4 Add hook docs
phpcs rules updated
2022-02-17 18:28:59 +02:00
Alex P
3b488fbf8e Allow to specify products value in partner referrals data 2022-01-14 13:56:52 +02:00
Anton Ukhanev
d4c8282518 Use Composer modules and convert modules to PSR-4
PSR-4 is much more robust and predictable. But to do this,
a source root dir must be specified for every module.
This could be done in the root file, but this is not very modular.
Instead, now every module declares its own source root by using
the amazing Composer Merge Plugin. This approach allows each module
to also declare its own dependencies. Together, these changes allow
modules to be easily extractable to separate pacakges when the need
arises, and in general improves modularity significantly.
2021-08-26 11:01:20 +02:00
Renamed from modules/ppcp-api-client/src/Repository/class-partnerreferralsdata.php (Browse further)