Skip to content

Conversation

@DAnn2012
Copy link

@DAnn2012 DAnn2012 commented Jan 6, 2026

All Submissions:

  • Does your code follow the WooCommerce Sniffs variant of WordPress coding standards?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Will this change require new documentation or changes to existing documentation?

Changes proposed in this Pull Request:

This PR updates three lines of code to correct the order of sprintf() and wp_kses_post(). The previous implementation applied wp_kses_post() before sprintf(), which could interfere with placeholder replacement and lead to incorrect output. The updated version now formats the string first and sanitizes it afterward, ensuring proper handling of the %1$s placeholder and producing the expected message.

Steps to test the changes in this Pull Request:

Changelog entry

Add - Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
Fixed Function in Payment_Gateway.php

@DAnn2012
Copy link
Author

DAnn2012 commented Jan 9, 2026

Hello @peterwilsoncc

When you can, could you take a look at this PR of mine?

Thanks.

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.

1 participant