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

Fix: allow svg in storefront messages, such as notices #2133

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

dinhtungdu
Copy link
Member

@dinhtungdu dinhtungdu commented Jan 15, 2024

Fixes #2129

This PR fix the missing icon issue of Woo notices with Storefront theme by adding svg and its child elements to the allowed html list for wp_kses().

Alternative

Do nothing, as commented here: #2129 (comment)

Screenshots

image

How to test the changes in this Pull Request:

  1. Create a test page and add the following shortcode to it [woocommerce_cart]
  2. Go to a product page and click the Add to cart button.
  3. See that the notice “{PRODUCT}” has been added to your cart. shows an icon. ✅
  4. Go to the test page from step 1. and update the quantity of the added product.
  5. See that the notice Cart updated. shows an icon. ✅
  6. Add a coupon code to the cart.
  7. See that the notice Coupon code applied successfully. shows an icon. ✅
  8. Add the same code again.
  9. See that the notice Coupon code already applied! shows an icon. ✅
  10. Add an invalid code.
  11. See that the notice Coupon "{CODE}" does not exist! shows an icon. ✅
  12. Remove the coupon code.
  13. See that the notice Coupon has been removed. shows an icon. ✅
  14. Remove the product from the cart.
  15. See that the notice Your cart is currently empty. shows an icon. ✅
  16. See that the notice “{PRODUCT}” removed. Undo? shows an icon. ✅

Changelog

Fix – Allow SVG in Storefront messages. #1319

@dinhtungdu dinhtungdu self-assigned this Jan 15, 2024
@dinhtungdu dinhtungdu marked this pull request as ready for review January 15, 2024 08:44
@dinhtungdu dinhtungdu changed the title fix: allow svg in storefront messages, such as notices Fix: allow svg in storefront messages, such as notices Jan 15, 2024
@dinhtungdu dinhtungdu requested review from a team and albarin and removed request for a team January 15, 2024 09:04
Copy link
Contributor

@albarin albarin left a comment

Choose a reason for hiding this comment

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

👍

@github-actions github-actions bot added the status: ready to merge Automatically applied to a pull when a pull is approved. Indicates ready for merging. label Jan 15, 2024
@dinhtungdu dinhtungdu merged commit e745f93 into trunk Jan 16, 2024
7 checks passed
@dinhtungdu dinhtungdu deleted the fix/2129-allow-svg-in-storefront-messages branch January 16, 2024 04:40
@dinhtungdu dinhtungdu added this to the 4.5.4 milestone Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to merge Automatically applied to a pull when a pull is approved. Indicates ready for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icon of new notices are not visible for certain actions
2 participants