Skip to content
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

Escape the default "Thank you" text instead of the filtered message #40353

Merged
merged 4 commits into from Sep 25, 2023
Merged

Escape the default "Thank you" text instead of the filtered message #40353

merged 4 commits into from Sep 25, 2023

Conversation

YordanSoares
Copy link
Contributor

@YordanSoares YordanSoares commented Sep 21, 2023

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #40329 and #40352

How to test the changes in this Pull Request:

  1. Activate this code snippet in your site:
add_filter('woocommerce_thankyou_order_received_text', 'wc_test_thank_you_link', 10, 2);
function wc_test_thank_you_link( $text, $order ) {
    $text .= '<p><a href="https://example.com">Click here</a></p>';
    return $text;
}
  1. Place a new order and check the code displayed after "Thank you. Your order has been received.", which should look like this:

image

Changelog entry

  • Automatically create a changelog entry from the details below.

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Escape the default 'thank you' text instead of the filtered message.

Comment

@github-actions github-actions bot added plugin: woocommerce Issues related to the WooCommerce Core plugin. type: community contribution labels Sep 21, 2023
@woocommercebot woocommercebot requested review from a team and jorgeatorres and removed request for a team September 21, 2023 16:01
@github-actions
Copy link
Contributor

Hi ,

Apart from reviewing the code changes, please make sure to review the testing instructions as well.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

@lsinger lsinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @YordanSoares for your contribution! I left a comment for a linting directive we'll need. Could you also please bump the version of that template file to 8.3.0?

For the future to lint changes:

cd plugins/woocommerce
pnpm lint:php:changes

This would then at least detect the need for the directive.

@lsinger
Copy link
Contributor

lsinger commented Sep 22, 2023

@YordanSoares It seems running the changelog adder doesn't currently work from forks. Could you run, from the root of the repository, the following to add a changelog file?

pnpm --filter=./plugins/woocommerce run changelog add

@YordanSoares
Copy link
Contributor Author

@YordanSoares It seems running the changelog adder doesn't currently work from forks. Could you run, from the root of the repository, the following to add a changelog file?

pnpm --filter=./plugins/woocommerce run changelog add

@lsinger I tried to add this command, but it didn't work on my Windows environment:

image

I tried installing all the prerequisites, but I haven't being able to run it with success, yet. Any ideas?

@YordanSoares
Copy link
Contributor Author

@lsinger it seems that @github-actions finally managed to log the change :)

Copy link
Contributor

@lsinger lsinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making those changes, @YordanSoares! Looks good to me.

It seems the CI checks aren't running -- I'll try to close and re-open this PR to trigger them again.

@lsinger lsinger closed this Sep 25, 2023
@lsinger lsinger reopened this Sep 25, 2023
@lsinger lsinger merged commit b2bbe5e into woocommerce:trunk Sep 25, 2023
33 of 34 checks passed
@github-actions github-actions bot added this to the 8.3.0 milestone Sep 25, 2023
@github-actions github-actions bot added the needs: analysis Indicates if the PR requires a PR testing scrub session. label Sep 25, 2023
@alopezari alopezari added needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. status: analysis complete Indicates if a PR has been analysed by Solaris and removed needs: analysis Indicates if the PR requires a PR testing scrub session. labels Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: external testing Indicates if the PR requires further testing conducted by testers external to the development team. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: analysis complete Indicates if a PR has been analysed by Solaris type: community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BC issue with woocommerce_thankyou_order_received_text
3 participants