Skip to content

Conversation

@puntope
Copy link
Collaborator

@puntope puntope commented Dec 16, 2025

This PR replaces wcgateway.settings service with the new SettingsProvider in ppcp-api-client module.

PR Changes

Tweak ExperienceContextBuilder for using SettingsProvider

  • get( 'brand_name') → SettingsProvider::brand_name
  • get( 'landing_page') → SettingsProvider::landing_page
  • get( 'payee_preferred') → SettingsProvider::instant_payments_only
  • Tweak tests

Tweak IdentityToken for using SettingsProvider

  • get( 'vault_enabled') → SettingsProvider::save_paypal_and_venmo
  • get( 'vault_enabled_dcc') → SettingsProvider::save_card_details
  • get( 'subscriptions_mode') → Copy SubscriptionSettingsMapHelper::mapped_value logic into $container->get( 'wc-subscriptions.subscription_mode' ) as this setting doesn't exist in the new settings. Then remove the Mapper when the refctor is completed ⚠️
  • Tweak tests

Tweak OrderEndpoint removing wcgateway.settings usages

  • get( 'intent' ) → SettingsProvider::authorize_only ( true 'AUTHORIZE' false: 'CAPTURE' ) ⚠️

Tweak PurchaseUnitSanitizer for using SettingsProvider

  • get('subtotal_mismatch_behavior') → SettingsProvider::subtotal_adjustment
  • get('subtotal_mismatch_line_name') -> removed. Using the default, as I didn't find the setting for this ⚠️
  • Tweak tests

Tweak ClientCredentials for using SettingsProvider

  • get( 'client_id' ) → SettingsProvider::merchant_data->client_id
  • get( 'client_secret' ) → SettingsProvider::merchant_data->client_secret
  • Tweak tests

Tweak PayPalBearer for using SettingsProvider

  • get( 'client_id' ) → SettingsProvider::merchant_data->client_id
  • get( 'client_secret' ) → SettingsProvider::merchant_data->client_secret
  • Tweak tests

@puntope puntope self-assigned this Dec 16, 2025
@github-actions
Copy link

github-actions bot commented Dec 16, 2025

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

🔗 Test this pull request with WordPress Playground

What's included:

  • ✅ WordPress (latest)
  • ✅ WooCommerce (latest)
  • ✅ PayPal Payments plugin v3.3.0-pr3951-20268537613-g10b96cd (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 3.3.0-pr3951-20268537613-g10b96cd
  • Commit: 10b96cd
  • Artifact: woocommerce-paypal-payments-3.3.0-pr3951-20268537613-g10b96cd

💡 The demo environment resets each time you refresh. Perfect for testing!

🔄 This link updates automatically with each new commit to the PR.

⚠️ This URL is valid for 30 days from when this comment was last updated.


🤖 Auto-generated for commit 10b96cd • Last updated: 2025-12-16T12:55:55.039Z

@puntope puntope marked this pull request as ready for review December 16, 2025 11:49
@puntope puntope marked this pull request as draft December 16, 2025 11:58
@puntope puntope closed this Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants