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

Items with ampersands (&) in the title are broken. #8

Open
minerscale opened this issue Jan 20, 2023 · 2 comments
Open

Items with ampersands (&) in the title are broken. #8

minerscale opened this issue Jan 20, 2023 · 2 comments

Comments

@minerscale
Copy link

Version: 4.6.2

Hi, apologies about the multiple issues but this one is a goodie.

Items with ampersands in the title claim take you to the page which says that the user has tampered with the price field when you hit 'add to cart'

image

A simple workaround is to get rid of any of the ampersands obviously but if this issue could be worked out that would be fantastic.

Thanks very much,
Aaron.

@Arsenal21
Copy link
Owner

The ampersands (&) should be fine in the product name field of the shortcode. I tested with the following and it works fine.

[wp_cart_button name="Product & test" price="20.00"]

The issue you pointed out could be related to page caching. The following documentation should be helpful:
https://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart-and-wp-super-cache-workaround-334

@minerscale
Copy link
Author

Oh! How fascinating, that would explain the weird behaviour given that your code that I read through just sanitises the input immediately. Thanks for your help.

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

No branches or pull requests

2 participants