Skip to content

Conversation

@Dinamiko
Copy link
Collaborator

When accessing the Change Payment Method page for a subscription (via My Account > Subscriptions), an infinite loop is triggered, causing a crash or white screen.

Steps to reproduce

  • create a page with classic checkout shortcode
  • Set it as Checkout page in WC advanced settings
  • Purchase a subscription and try to change payment from My Account / Subscriptions / Subscription / Change payment button

PR Changes

get_the_content() internally calls the_title_attribute(), which applies the the_title filter. When WooCommerce Subscriptions hooks that filter and calls is_checkout(), it triggers our woocommerce_is_checkout handler, which calls back into find_classic_shortcode_block() creating infinite recursion.

This PR uses get_post()->post_content bypassing all filters, which is safe here since we only need the raw block markup.

@github-actions
Copy link

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.4.0-pr4085-21949364542-g4c34344 (built from this PR)

Login credentials:

  • Username: admin
  • Password: password

Plugin Details:

  • Version: 3.4.0-pr4085-21949364542-g4c34344
  • Commit: 4c34344
  • Artifact: woocommerce-paypal-payments-3.4.0-pr4085-21949364542-g4c34344

💡 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 4c34344 • Last updated: 2026-02-12T14:05:42.410Z

@Dinamiko Dinamiko merged commit f1b8631 into dev/develop Feb 13, 2026
18 checks passed
@Dinamiko Dinamiko deleted the dev/PCP-5900-infinite-loop-while-trying-to-change-payment-method-for-subscription branch February 13, 2026 14:14
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