Skip to content

Fix empty description handling and logo display for PayPal gateway (4999) #3527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

danieldudzic
Copy link
Collaborator

Summary

This PR will fix the issue where the PayPal gateway was not handling empty descriptions correctly (reverting to defaults) and the Show logo toggle was not functioning properly.

Screenshots

Before

Settings Checkout
WooCommerce_settings_‹_WooCommerce_PayPal_Payments_—_WordPress Classic_Checkout_–_WooCommerce_PayPal_Payments

After

Settings Checkout
WooCommerce_settings_‹_WooCommerce_PayPal_Payments_—_WordPress Classic_Checkout_–_WooCommerce_PayPal_Payments

Testing Steps

  1. Enable PayPal.
  2. In PayPal gateway settings.
  3. Set the Checkout Page Description field to be empty.
  4. Untoggle the Show logo option.
  5. Navigate to Checkout page (Classic & Block).
  6. Confirm there's no gateway description displayed for PayPal and no logo is present.

- Override `get_description()` to properly handle saved empty descriptions using `array_key_exists()` instead of `get_option()` fallbacks
- Fix issue where empty descriptions reverted to defaults
- Utilize the `woocommerce_paypal_payments_paypal_gateway_icon` filter to handle PayPal logo display correctly
@danieldudzic danieldudzic requested a review from Dinamiko July 14, 2025 17:49
@InpsydeNiklas InpsydeNiklas merged commit 206804c into trunk Aug 4, 2025
11 checks passed
@InpsydeNiklas InpsydeNiklas deleted the PCP-4999-pay-pal-configuration-description-logo-not-working-as-expected branch August 4, 2025 17:22
@InpsydeNiklas InpsydeNiklas added this to the 3.1.0 milestone Aug 4, 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.

3 participants