Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1040 commits
Select commit Hold shift + click to select a range
a6cb6bc
🔥 Remove PayPal order sync from ReplaceCartEndpoint
danieldudzic Feb 16, 2026
2cac663
✨ Add PayPal order sync before capture in checkout
danieldudzic Feb 16, 2026
b565e1b
🔧 Update DI for deferred PayPal order sync
danieldudzic Feb 16, 2026
bba4b70
✨ Extract calculate_totals and money helpers to CartHelper
danieldudzic Feb 17, 2026
d6b9c23
♻️ Use shared CartHelper for totals calculation in CartResponse
danieldudzic Feb 17, 2026
ff0e8a1
♻️ Use shared CartHelper for totals calculation in PayPalOrderManager
danieldudzic Feb 17, 2026
3c71c78
🎨 Minor code re-formatting
stracker-phil Feb 17, 2026
b5688da
♻️ Extract product filter-rules to config class
stracker-phil Feb 17, 2026
4f09d80
👔 Add product validation based on shared config
stracker-phil Feb 17, 2026
f93d99d
Merge branch 'dev/develop'
stracker-phil Feb 17, 2026
c99730c
Merge pull request #4093 from woocommerce/PCP-5909-review-and-fix-age…
stracker-phil Feb 17, 2026
0125c93
Merge pull request #4089 from woocommerce/dev/PCP-5856-add-resolution…
stracker-phil Feb 17, 2026
5febe2c
Merge pull request #4095 from woocommerce/dev/PCP-5863-inaccurate-car…
stracker-phil Feb 17, 2026
f9cdd45
Merge pull request #4094 from woocommerce/dev/PCP-5859-defer-pay-pal-…
stracker-phil Feb 17, 2026
4820e9b
🔀 Merge branch ‘dev/PCP-4891-agentic-commerce'
stracker-phil Feb 17, 2026
c212a92
✅ Resolved merge conflict
stracker-phil Feb 17, 2026
1721ee4
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Feb 18, 2026
bb70843
➕ Add the missing JWT dependency
stracker-phil Feb 18, 2026
c211460
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Feb 18, 2026
28c5d7c
🔥 Remove the psalm config file
stracker-phil Feb 18, 2026
65437fa
💚 Help phpstan to pass checks
stracker-phil Feb 19, 2026
d5e2257
Merge pull request #4096 from woocommerce/dev/PCP-5883-verify-product…
stracker-phil Feb 19, 2026
5e8497d
🚚 Rename module folder
stracker-phil Feb 19, 2026
2c43ae6
♻️ Str-replace the namespace to StoreSync
stracker-phil Feb 19, 2026
cd4f80a
🚚 Rename the main module entry class
stracker-phil Feb 19, 2026
7d2e01a
🚚 Rename unit- and integration-tests
stracker-phil Feb 19, 2026
9824697
♻️ Adjust the PSR-4 autoload path for store-sync
stracker-phil Feb 20, 2026
dfaa496
♻️ Rename the feature flag to STORE_SYNC
stracker-phil Feb 20, 2026
0deb2d5
💡 Add an unrelated todo comment
stracker-phil Feb 20, 2026
96afa85
♻️ Adjust name of the store-sync webpack module
stracker-phil Feb 20, 2026
bf8c2a4
♻️ Rebrand the status page to “Store Sync”
stracker-phil Feb 20, 2026
2d76aef
♻️ Correct AssetGetter integration
stracker-phil Feb 20, 2026
4b84525
✨ Generate script handle via AssetGetter
stracker-phil Feb 20, 2026
fbeddc3
♻️ Rename the merchant setting
stracker-phil Feb 20, 2026
2ad769d
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Feb 20, 2026
53b382f
♻️ Rename WP hooks to “store_sync”
stracker-phil Feb 20, 2026
e93fbd2
🔀 Merge branch 'dev/develop'
stracker-phil Feb 20, 2026
382d288
Add validate condition on missing shipping address
mmaymo Feb 20, 2026
582d923
Merge pull request #4106 from woocommerce/dev/PCP-5707-rename-to-stor…
stracker-phil Feb 25, 2026
0c146b2
Merge branch 'dev/PCP-4891-agentic-commerce' into PCP-5867-missing-sh…
mmaymo Feb 27, 2026
9d48406
Update to ResolutionOption factory
mmaymo Feb 27, 2026
974898f
Add description to plain texts and more filters
mmaymo Mar 2, 2026
d44d866
Remove space
mmaymo Mar 2, 2026
2c641ed
Update modules/ppcp-store-sync/src/Schema/ResolutionOption.php
mmaymo Mar 2, 2026
cb5f00e
Update inline comments
mmaymo Mar 2, 2026
977bc1d
🔀 Merge branch 'dev/develop'
stracker-phil Mar 3, 2026
2f2176a
🐛 Remove deprecated check for legacy UI
stracker-phil Mar 3, 2026
aa3aba0
♻️ Refactor ValidationIssue to builder pattern
stracker-phil Mar 5, 2026
1da7b49
🚚 Rename and cleanup the validation issue context enums
stracker-phil Mar 6, 2026
1f20240
🔥 Remove dead code from enum classes
stracker-phil Mar 6, 2026
7165fe2
✨ Create the abstract issue context base classes
stracker-phil Mar 6, 2026
d448fc3
✨ Implement 65 specific context classes
stracker-phil Mar 6, 2026
ceaf0b4
♻️ Implement the new IssueContext in ValidationIssue class
stracker-phil Mar 6, 2026
c67494e
✨ Implement full IssueContext props per API specs
stracker-phil Mar 6, 2026
40cf83e
♻️ Implement new IssueContext in validation code
stracker-phil Mar 6, 2026
6b451de
🚧 Start to refactor the ResolutionOption pattern
stracker-phil Mar 6, 2026
6c88c94
♻️ Apply new builder pattern to ResolutionOption
stracker-phil Mar 6, 2026
7bee767
♻️ Refactor Schema code to new ValidationIssue API
stracker-phil Mar 6, 2026
07f27b0
⏪️ Add accidentally dropped label to resolutions
stracker-phil Mar 6, 2026
ba3ca79
♻️ Refactor ProductsPayload field getter methods
stracker-phil Mar 11, 2026
77991fa
Merge pull request #4130 from woocommerce/dev/PCP-5912-product-ingest…
stracker-phil Mar 11, 2026
60306fd
Merge pull request #4109 from woocommerce/PCP-5867-missing-shipping-a…
stracker-phil Mar 11, 2026
5fe7afd
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Mar 11, 2026
e1bc02d
♻️ Convert typed classes to "typed factories"
stracker-phil Mar 11, 2026
e9d8506
♻️ Apply factory-method pattern to ValidationIssue
stracker-phil Mar 11, 2026
ddc16ed
✅ Migrate tests to new factory pattern
stracker-phil Mar 11, 2026
2856d90
🔀 Merge branch 'dev/develop'
stracker-phil Mar 26, 2026
6b5bd5b
⬆️ Update composer packages (install JWT)
stracker-phil Mar 26, 2026
a607897
✨ Provide new apiBaseUrl with registration
stracker-phil Mar 26, 2026
43c133d
🔧 Add current agentic code to PHPStan baseline
stracker-phil Mar 26, 2026
d2a46ea
✅ Adjust unit tests to apiBaseUrl changes
stracker-phil Mar 26, 2026
e8a98b3
✅ Fix failing tests for store-sync module
stracker-phil Mar 26, 2026
99683e5
Merge pull request #4151 from woocommerce/dev/PCP-5961-validation-iss…
stracker-phil Mar 26, 2026
40860fe
🔀 Merge remote-tracking branch into local branch
stracker-phil Mar 26, 2026
19d44fe
🔀 Merge branch 'dev/develop'
stracker-phil Apr 14, 2026
bf7f428
Merge branch '_develop' into 4891-EPIC-agentic-commerce
stracker-phil Apr 21, 2026
3dcfa5a
🎨 Fix CI warnings caused by white space issues
stracker-phil Apr 21, 2026
77d5965
💚 Fix CI failure due to missing function stubs
stracker-phil Apr 21, 2026
d749cf5
🔥 Remove the test entry from the cart response
stracker-phil Apr 22, 2026
f41da6f
🧪 Add tests for planned ShippingOptionBuilder
stracker-phil Apr 27, 2026
8cf5661
✨ Initial version of the ShippingOptionBuilder
stracker-phil Apr 27, 2026
129cd88
👔 Inject new builder into cart factory
stracker-phil Apr 27, 2026
9fb6a3d
🔀 Merge branch 'PCP-6085-remove-test-output'
stracker-phil Apr 27, 2026
9cb8878
✅ Fix wrong namespace in test file
stracker-phil Apr 27, 2026
69a41eb
🧪 Greatly extend the CartResponse tests
stracker-phil Apr 27, 2026
5663e85
♻️ Consolidate all cart responses in one class
stracker-phil Apr 27, 2026
903c531
✅ Adjust outdated test syntax after last commit
stracker-phil Apr 27, 2026
11d4091
🔥 Delete old cart response classes
stracker-phil Apr 27, 2026
c8e3ca6
♻️ Update the cart response factory to new syntax
stracker-phil Apr 27, 2026
10d5161
🔀 Merge branch 'dev/develop'
stracker-phil Apr 28, 2026
a0951c9
🤡 Add stub for WC_Validation class
stracker-phil Apr 28, 2026
e70e7e9
Merge pull request #4300 from woocommerce/dev/PCP-6085-remove-test-ou…
stracker-phil Apr 28, 2026
d6a8bf7
🧪 Adjust tests to reflect the new expectations
stracker-phil Apr 28, 2026
ae14315
📝 Add a todo comment to always-skipped test
stracker-phil Apr 28, 2026
00f30c7
♻️ Refactor test code using a custom assertion
stracker-phil Apr 28, 2026
fa608ec
♻️ Rename the outdated cart-totals properties
stracker-phil Apr 28, 2026
c3ab3bc
✨ New service to retrieve Woo's currency code
stracker-phil Apr 28, 2026
04b13e4
✅ Add tests for the StoreCurrencyValue class
stracker-phil Apr 28, 2026
c65e0fd
🏗️ Inject the store currency into response factory
stracker-phil Apr 28, 2026
99d397f
🔀 Merge branch 'dev/PCP-6271-shipping-options'
stracker-phil Apr 28, 2026
c1c6f0b
✨ Add a new default-currency to CartResponse
stracker-phil Apr 28, 2026
8a87ac2
🏗️ Inject new store currency into CartResponse
stracker-phil Apr 28, 2026
fc15571
🔀 Merge branch 'dev/develop'
stracker-phil Apr 28, 2026
6b7cf63
🔥 Remove incorrect test
stracker-phil Apr 28, 2026
6e13bb6
♻️ Simplify and document ShippingOptionsBuilder
stracker-phil Apr 28, 2026
bbf6794
♻️ Replace number_format with CartHelper method
stracker-phil Apr 28, 2026
ba741bf
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 28, 2026
9703f7f
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 28, 2026
14cc3b7
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 28, 2026
324ef62
🔀 Merge branch 'dev/PCP-6271-shipping-options'
stracker-phil Apr 28, 2026
6da3688
🧪 Add failing tests with new expectations
stracker-phil Apr 28, 2026
0dbe673
🎨 Apply code format
stracker-phil Apr 28, 2026
5710a95
👔 Add new check for unsupported countries
stracker-phil Apr 29, 2026
bfeb693
♻️ Improve the shipping validation test suite
stracker-phil Apr 29, 2026
d516811
♻️ Consolidate country-based validation issues
stracker-phil Apr 29, 2026
0a224e7
♻️ Apply new assertions to other validation tests
stracker-phil Apr 29, 2026
afec75b
Merge pull request #4306 from woocommerce/dev/PCP-6271-shipping-options
stracker-phil Apr 29, 2026
9d09208
🔀 Merge ranch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 29, 2026
b575b70
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 29, 2026
9f9a2a2
🧪 Add failing "Shipping" context test cases
stracker-phil Apr 29, 2026
da71800
🧪 Add partially failing "Inventory" test cases
stracker-phil Apr 29, 2026
ed70381
🧪 Add partially failing "Product" test cases
stracker-phil Apr 29, 2026
16b9c14
♻️ Pull cart factories into base test class
stracker-phil Apr 29, 2026
8ad0185
✅ Add missing context data to product validator
stracker-phil Apr 29, 2026
01c5e6e
✅ Add missing context to inventory validator
stracker-phil Apr 29, 2026
2d7cfd2
✅ Add missing context to shipping validator
stracker-phil Apr 29, 2026
ba9b145
✅ Add missing issue/context to payment issues
stracker-phil Apr 29, 2026
41d5f8f
🎨 Format code
stracker-phil Apr 29, 2026
a05493a
🧪 Add failing test to document bug
stracker-phil Apr 29, 2026
43cdc25
🐛 Fix the cart-id bug
stracker-phil Apr 30, 2026
03ba7f0
🎨 Apply code format
stracker-phil Apr 30, 2026
3124a13
Merge pull request #4310 from woocommerce/dev/PCP-6272-response-keys-…
stracker-phil Apr 30, 2026
6f816b6
🎨 Add missing declare strict to several files
stracker-phil Apr 30, 2026
bee32ec
🎨 Add empty line before declare strict
stracker-phil Apr 30, 2026
dfb33dd
♻️ Clean up redundant tests
stracker-phil Apr 30, 2026
f9ad63f
🔥 Remove comment noise from constructor
stracker-phil Apr 30, 2026
11eb443
📝 Remove outdated WIP comment
stracker-phil Apr 30, 2026
b6d96d6
Merge pull request #4312 from woocommerce/dev/PCP-5956-validate-shipp…
stracker-phil Apr 30, 2026
e736ad8
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 30, 2026
2a481b0
🔀 Merge branch 'dev/PCP-6272-always-add-currency'
stracker-phil Apr 30, 2026
7cbd70f
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil Apr 30, 2026
02b67e6
Merge pull request #4320 from woocommerce/dev/PCP-6285-return-cart-id
stracker-phil Apr 30, 2026
6fbaf62
Merge pull request #4319 from woocommerce/dev/PCP-6273-add-validation…
stracker-phil Apr 30, 2026
ca37a96
Merge pull request #4311 from woocommerce/dev/PCP-6272-always-add-cur…
stracker-phil Apr 30, 2026
ec0ceeb
Merge pull request #4322 from woocommerce/dev/PCP-6272-add-declare-st…
stracker-phil Apr 30, 2026
0ed2678
🔀 Merge branch 'dev/develop'
stracker-phil Apr 30, 2026
3a32518
🔥 Remove the Inspector wiring from the module
stracker-phil Apr 30, 2026
3b87b80
🔥 Remove unused Inspector files
stracker-phil Apr 30, 2026
33a53d7
Merge pull request #4324 from woocommerce/dev/PCP-6118-remove-status-…
stracker-phil Apr 30, 2026
466f507
🔀 Merge branch 'dev/develop'
stracker-phil May 4, 2026
81f97da
🧪 Add failing tests to document bug
stracker-phil May 5, 2026
71f354c
🐛 Add missing PayPalCart "shipping_option" prop
stracker-phil May 5, 2026
905fedd
🐛 Transfer shipping info from PP-Cart to WC-Cart
stracker-phil May 5, 2026
decdfe7
🧪 Fix incorrect test assumptions
stracker-phil May 5, 2026
f0c92f2
🐛 Fix agentic code to address bugs
stracker-phil May 5, 2026
1f66841
♻️ Refactor order updates to use PatchCollection
stracker-phil May 5, 2026
a2f288c
🧪 Add unit test for a planned WP filter
stracker-phil May 6, 2026
ecc3f60
✨ Implement filter to replace shipping details
stracker-phil May 6, 2026
e19076c
🎨 Format unit test code
stracker-phil May 6, 2026
7cff7e2
🧪 Add tests for planned order-processing changes
stracker-phil May 6, 2026
30091c6
🐛 Fix the shipping option details during checkout
stracker-phil May 6, 2026
05eb714
🔀 Merge branch 'dev/develop'
stracker-phil May 7, 2026
4a0509b
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil May 7, 2026
85bd336
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil May 7, 2026
6060f3e
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil May 7, 2026
711f7da
♻️ Implement StoreCurrencyValue in all call sites
stracker-phil May 7, 2026
de80fb6
🎨 Apply code formatting
stracker-phil May 7, 2026
5b7603f
🧪 Test the build_items_for_patch method
stracker-phil May 7, 2026
60689e4
🧪 Test amounts in order patch payload
stracker-phil May 7, 2026
3a26508
✨ New StoreData to simplify cart-item access
stracker-phil May 7, 2026
3028821
♻️ Create new store sync test-base class
stracker-phil May 7, 2026
cb0def6
♻️ Use new StoreData class for PayPalOrderManager
stracker-phil May 7, 2026
9038c10
🐛 Base order details on WC_Cart & AmountFactory
stracker-phil May 7, 2026
12c23b7
🔊 Add logging to AgenticCheckoutProcessor
stracker-phil May 7, 2026
b813d14
✨ Add new StoreValidation class
stracker-phil May 11, 2026
c8daff1
♻️ Refactor module to use new StoreValidator
stracker-phil May 11, 2026
c7003d0
✨ Add StorePayPalCart class for output generation
stracker-phil May 11, 2026
f3dbf24
♻️ Set up StorePayPalCart, remove CartItem factory
stracker-phil May 11, 2026
04c723e
♻️ Integrate new StoreData into endpoint classes
stracker-phil May 11, 2026
b4c91ae
♻️ Implement new StoreData into Validators
stracker-phil May 11, 2026
772821f
♻️ Implement StoreData in ResponseFactory
stracker-phil May 11, 2026
fdf7685
🚚 Rename integration tests to StoreSync
stracker-phil May 11, 2026
3d36e13
♻️ First cleanup of CartHelper
stracker-phil May 11, 2026
27b2010
♻️ Replace CartHelper::format_decimal()
stracker-phil May 11, 2026
4336967
♻️ Replace get_woocommerce_currency with service
stracker-phil May 11, 2026
49c1c23
♻️ Remove StoreCurrencyValue from CartValidation
stracker-phil May 11, 2026
c1494ce
♻️ Clean up PriceValidator
stracker-phil May 11, 2026
ab0bf79
♻️ Use Address schema instead of array access
stracker-phil May 11, 2026
be1c58c
🔥 First removal of unused helper methods
stracker-phil May 11, 2026
b8f626c
♻️ Move address helper code to CheckoutProcessor
stracker-phil May 11, 2026
ba9c058
🔥 Remove obsolete CartHelper class
stracker-phil May 11, 2026
b0c2815
✅ Add new unit test coverage
stracker-phil May 11, 2026
9c35e8f
♻️ Add optional default values to Schema getters
stracker-phil May 11, 2026
2a4cac5
🧪 First integration test for Create Cart
stracker-phil May 11, 2026
8e5b9ba
🐛 Fix bug reported by integration test
stracker-phil May 11, 2026
c48d6b0
♻️ Add ::to_array() to Schema classes
stracker-phil May 11, 2026
d782f4e
♻️ Clean up redundant output schema/formatting
stracker-phil May 11, 2026
0e94223
✅ Update unit tests to address recent changes
stracker-phil May 11, 2026
8b9c181
🎨 Update code style of unit tests
stracker-phil May 11, 2026
e9e0985
♻️ Minor code improvements
stracker-phil May 11, 2026
48f1bc4
🐛 Return net prices in `items` array
stracker-phil May 11, 2026
5d987cb
🧪 Add new integration test for current regression
stracker-phil May 12, 2026
cf1e445
🚚 Move Auth test to parent folder
stracker-phil May 12, 2026
d0a90a9
🐛 Fix wrong API payload in test cases
stracker-phil May 12, 2026
4eb1e1f
🐛 Fix missing ec_token pass-through in cart API
stracker-phil May 12, 2026
908ab45
♻️ Sort/organize the API response object
stracker-phil May 12, 2026
728dd07
🐛 Change ValidationIssue context to single object
stracker-phil May 12, 2026
73ed2ba
✅ Add missing mock for WooCommerce function
stracker-phil May 12, 2026
d20ff3b
✅ Adjust tests to match new context expectation
stracker-phil May 12, 2026
1730f8b
✅ Clean up test cases after refactoring
stracker-phil May 12, 2026
af496db
♻️ Move "token" into StorePayPalCart class
stracker-phil May 12, 2026
6b7a499
✅ Update tests to handle new cart-level-token
stracker-phil May 12, 2026
127c850
🧪 Add Postman expectations to integration tests
stracker-phil May 12, 2026
d0f5cb1
🏗️ Make customer & shipping_address non-null-able
stracker-phil May 12, 2026
885c617
♻️ Rename the StoreCartItem getter method
stracker-phil May 12, 2026
d149dc8
♻️ Convert to_array method into individual getters
stracker-phil May 12, 2026
b85eb94
✅ Update failing unit tests due to recent changes
stracker-phil May 12, 2026
84a8bf0
🔥 Remove dead code
stracker-phil May 12, 2026
0a56cda
✨ Extend the StoreCartItem with new getters
stracker-phil May 12, 2026
3cce716
♻️ Simplify validators using StoreCartItem data
stracker-phil May 12, 2026
2a249b3
🐛 Handle potential null values in setters
stracker-phil May 12, 2026
09eb099
🐛 Fix condition
stracker-phil May 12, 2026
cd6db31
✨ Add getter for full customer name
stracker-phil May 12, 2026
3ef25ea
🐛 Convert PHP 8 syntax to PHP 7.4 code
stracker-phil May 12, 2026
b6d68bf
🎨 Improve code style, add comments
stracker-phil May 12, 2026
15c8375
✅ Update unit tests to handle recent changes
stracker-phil May 12, 2026
e2a21a3
🧑‍💻 Split agentic logging into two files/streams
stracker-phil May 12, 2026
7150336
Merge pull request #4339 from woocommerce/dev/PCP-6289-checkout-shipp…
stracker-phil May 12, 2026
1871feb
Merge pull request #4340 from woocommerce/dev/PCP-6289-refactor-check…
stracker-phil May 12, 2026
5e547d7
Merge pull request #4355 from woocommerce/dev/PCP-6322-split-log-files
stracker-phil May 12, 2026
028543f
🔀 Merge branch 'dev/PCP-4891-agentic-commerce'
stracker-phil May 12, 2026
31f3a8d
Merge pull request #4346 from woocommerce/dev/PCP-6289-fix-missing-cu…
stracker-phil May 12, 2026
0081fbe
🔀 Merge branch 'dev/develop'
stracker-phil May 12, 2026
d563992
✨ Allow ReplaceCart endpoint to (re)create token
stracker-phil May 12, 2026
95d26ae
✅ Add unit tests to verify token regeneration
stracker-phil May 12, 2026
921e99c
Merge pull request #4356 from woocommerce/dev/PCP-5866-update-ec_token
stracker-phil May 12, 2026
a947ac5
🐛 Handle cases filtered array index > 0
stracker-phil May 13, 2026
d30dc25
🐛 Fix DI service name (logger)
stracker-phil May 13, 2026
aa83e4f
🐛 Convert str_starts_with to PHP 7.4 syntax
stracker-phil May 13, 2026
b4492b6
🐛 Convert str_ends_with to PHP 7.4 syntax
stracker-phil May 13, 2026
020b5fb
🐛 Convert str_contains to PHP 7.4 syntax
stracker-phil May 13, 2026
f893759
🔒️ Harden against JWK algorithm confusion attacks
stracker-phil May 13, 2026
bd4682b
🔒️ Strip invalid JWK keys before decoding them
stracker-phil May 13, 2026
f925b40
Merge pull request #4357 from woocommerce/dev/PCP-6398-fix-array-index
Dinamiko May 13, 2026
d411f49
Merge pull request #4358 from woocommerce/dev/PCP-6398-undefined-di-s…
Dinamiko May 13, 2026
8619fd5
Merge pull request #4359 from woocommerce/dev/PCP-6398-php-74-compati…
Dinamiko May 13, 2026
270f2c2
Merge pull request #4360 from woocommerce/dev/PCP-6398-jwt-expiration
Dinamiko May 13, 2026
2405a17
Fix phpstan
Dinamiko May 13, 2026
b5bce02
Fix phpstan
Dinamiko May 13, 2026
4a0cd5d
Fix phpstan
Dinamiko May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"psr/log": "^1.1",
"ralouphie/getallheaders": "^3.0",
"wikimedia/composer-merge-plugin": "^2.0",
"symfony/polyfill-php80": "^1.19"
"symfony/polyfill-php80": "^1.19",
"firebase/php-jwt": "^6"
},
"require-dev": {
"inpsyde/composer-assets-compiler": "^2.5",
Expand Down Expand Up @@ -112,6 +113,11 @@
"dealerdirect/phpcodesniffer-composer-installer": true,
"wikimedia/composer-merge-plugin": true,
"composer/installers": true
},
"audit": {
"ignore": {
"PKSA-y2cr-5h3j-g3ys": "Disputed CVE. Only affects applications generating weak keys, which is not relevant for this plugin."
}
}
}
}
81 changes: 72 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
use WooCommerce\PayPalCommerce\PayLaterBlock\PayLaterBlockModule;
use WooCommerce\PayPalCommerce\PayLaterWCBlocks\PayLaterWCBlocksModule;
use WooCommerce\PayPalCommerce\PayLaterConfigurator\PayLaterConfiguratorModule;
use WooCommerce\PayPalCommerce\Settings\SettingsModule;

return function ( string $root_dir ): iterable {
return static function ( string $root_dir ): iterable {
$modules_dir = "$root_dir/modules";

$modules = array(
Expand Down Expand Up @@ -85,5 +86,12 @@
$modules[] = ( require "$modules_dir/ppcp-axo-block/module.php" )();
}

if ( apply_filters(
'woocommerce.feature-flags.woocommerce_paypal_payments.store_sync_enabled',
getenv( 'PCP_STORE_SYNC_ENABLED' ) === '1'
) ) {
$modules[] = ( require "$modules_dir/ppcp-store-sync/module.php" )();
}

return $modules;
};
46 changes: 46 additions & 0 deletions modules/ppcp-api-client/src/Endpoint/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,50 @@ public function order( string $id ): array {

return $response;
}

/**
* Patch a PayPal order.
*
* @param string $id PayPal order ID.
* @param array $patch_data The PATCH operations array.
* @return array
* @throws RuntimeException If something went wrong with the request.
* @throws PayPalApiException If something went wrong with the PayPal API request.
*/
public function patch_order( string $id, array $patch_data ): array {
$bearer = $this->bearer->bearer();
$url = trailingslashit( $this->host ) . 'v2/checkout/orders/' . $id;

$args = array(
'method' => 'PATCH',
'headers' => array(
'Authorization' => 'Bearer ' . $bearer->token(),
'Content-Type' => 'application/json',
'PayPal-Request-Id' => uniqid( 'ppcp-', true ),
),
'body' => wp_json_encode( $patch_data ),
);

$response = $this->request( $url, $args );
if ( $response instanceof WP_Error ) {
throw new RuntimeException( $response->get_error_message() );
}

$status_code = (int) wp_remote_retrieve_response_code( $response );
if ( $status_code !== 204 ) {
$body = json_decode( $response['body'] );

$message = $body->details[0]->description ?? '';
if ( $message ) {
throw new RuntimeException( $message );
}

throw new PayPalApiException(
$body,
$status_code
);
}

return $response;
}
}
2 changes: 1 addition & 1 deletion modules/ppcp-blocks/src/BlocksModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static function () use ( $c ) {
add_filter(
'woocommerce_paypal_payments_sdk_components_hook',
function ( array $components, string $context ) {
if ( str_ends_with( $context, '-block' ) ) {
if ( substr( $context, -6 ) === '-block' ) {
$components[] = 'buttons';
}

Expand Down
2 changes: 1 addition & 1 deletion modules/ppcp-button/src/Endpoint/CreateOrderEndpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ private function create_paypal_order( ?WC_Order $wc_order = null, string $paymen
&& array_filter(
$exception->details(),
function ( stdClass $detail ): bool {
return isset( $detail->field ) && str_contains( (string) $detail->field, 'shipping/address' );
return isset( $detail->field ) && strpos( (string) $detail->field, 'shipping/address' ) !== false;
}
) ) {
$this->logger->info( 'Invalid shipping address for order creation, retrying without it.' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,11 @@ function ( $option ) {
$shipping = $this->shipping_factory->from_paypal_response( $shipping_address_data );
}

return $shipping;
return apply_filters(
'woocommerce_paypal_payments_order_creator_get_shipping',
$shipping,
$order,
$paypal_data
);
}
}
11 changes: 9 additions & 2 deletions modules/ppcp-card-fields/src/CardFieldsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,15 @@ function ( Order $order ) use ( $c ) {

$logger->warning( "Could not capture order {$order->id()}" );

if ( apply_filters( 'woocommerce_paypal_payments_force_delete_wc_order_on_failed_capture', true ) ) {
// Add delete order flag in WC session to force delete on process payment failure handler.
// Only set session flag if WC session exists (not in API/agentic context).
/**
* Fires to add a delete order flag in WC session.
*/
if ( apply_filters( 'woocommerce_paypal_payments_force_delete_wc_order_on_failed_capture', true )
&& function_exists( 'WC' ) && WC()->session instanceof \WC_Session ) {
/**
* Add delete order flag in WC session to force delete on process payment failure handler.
*/
WC()->session->set( 'ppcp_delete_wc_order_on_payment_failure', true );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ private function is_rest_request(): bool {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
$request_uri = wp_unslash( $_SERVER['REQUEST_URI'] ?? '' );

return str_contains( $request_uri, '/wp-json/wc/' );
return is_string( $request_uri ) && strpos( $request_uri, '/wp-json/wc/' ) !== false;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import SettingsBlock from '@ppcp-settings/Components/ReusableComponents/Settings
import Accordion from '@ppcp-settings/Components/ReusableComponents/AccordionSection';
import { SettingsHooks } from '@ppcp-settings/data';
import SoftDescriptorInput from '@ppcp-settings/Components/ReusableComponents/Controls/SoftdescriptorInput';
import { useRegisteredSettings, SLOTS } from '@ppcp-settings/extensions';

const PaypalSettings = ( { hasContactModule } ) => {
const {
savePaypalAndVenmo,
setSavePaypalAndVenmo,
contactModule,
setContactModule,
subtotalAdjustment,
Expand All @@ -34,6 +33,9 @@ const PaypalSettings = ( { hasContactModule } ) => {
const siteTitle = siteData?.title;
const buttonLanguageChoices = window.ppcpSettings.buttonLanguageChoices;

// Get registered settings for this slot
const footerSettings = useRegisteredSettings( SLOTS.PAYPAL_SETTINGS_END );

return (
<Accordion
className="ppcp--paypal-settings"
Expand Down Expand Up @@ -158,6 +160,11 @@ const PaypalSettings = ( { hasContactModule } ) => {
) }
/>
</SettingsBlock>

{ /* Extension point */ }
{ footerSettings.map( ( { component: Component, id } ) => (
<Component key={ id } />
) ) }
</Accordion>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,34 @@ import SavePaymentMethods from './Blocks/SavePaymentMethods';
import InvoicePrefix from './Blocks/InvoicePrefix';
import PayNowExperience from './Blocks/PayNowExperience';
import StayUpdated from './Blocks/StayUpdated';
import { useRegisteredSettings, SLOTS } from '@ppcp-settings/extensions';

const CommonSettings = ( { ownBrandOnly } ) => (
<SettingsCard
icon="icon-settings-common.svg"
title={ __( 'Common settings', 'woocommerce-paypal-payments' ) }
className="ppcp-r-settings-card ppcp-r-settings-card--common-settings"
description={ __(
'Customize key features to tailor your PayPal experience.',
'woocommerce-paypal-payments'
) }
>
<InvoicePrefix />
<OrderIntent />
<SavePaymentMethods ownBradOnly={ ownBrandOnly } />
<PayNowExperience />
<StayUpdated />
</SettingsCard>
);
const CommonSettings = ( { ownBrandOnly } ) => {
// Get registered settings for common settings
const footerSettings = useRegisteredSettings( SLOTS.COMMON_SETTINGS_END );

return (
<SettingsCard
icon="icon-settings-common.svg"
title={ __( 'Common settings', 'woocommerce-paypal-payments' ) }
className="ppcp-r-settings-card ppcp-r-settings-card--common-settings"
description={ __(
'Customize key features to tailor your PayPal experience.',
'woocommerce-paypal-payments'
) }
>
<InvoicePrefix />
<OrderIntent />
<SavePaymentMethods ownBradOnly={ ownBrandOnly } />
<PayNowExperience />
<StayUpdated />

{ /* Extension point */ }
{ footerSettings.map( ( { component: Component, id } ) => (
<Component key={ id } />
) ) }
</SettingsCard>
);
};

export default CommonSettings;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import DisconnectButton from './Parts/DisconnectButton';
import SettingsBlock from '@ppcp-settings/Components/ReusableComponents/SettingsBlock';
import { ControlStaticValue } from '@ppcp-settings/Components/ReusableComponents/Controls';
import { CardActions } from '@ppcp-settings/Components/ReusableComponents/Elements';
import { useRegisteredSettings, SLOTS } from '@ppcp-settings/extensions';

const ConnectionStatus = () => {
const merchant = CommonHooks.useMerchant();
Expand All @@ -16,6 +17,9 @@ const ConnectionStatus = () => {
'ppcp--type-casual': merchant.isCasualSeller,
} );

// Get registered settings for connection status
const footerSettings = useRegisteredSettings( SLOTS.CONNECTION_STATUS_END );

return (
<SettingsCard
className={ className }
Expand Down Expand Up @@ -55,6 +59,11 @@ const ConnectionStatus = () => {
showCopy={ true }
/>
</SettingsBlock>

{ /* Extension point */ }
{ footerSettings.map( ( { component: Component, id } ) => (
<Component key={ id } />
) ) }
</SettingsCard>
);
};
Expand Down
Loading
Loading