Skip to content
Advertisement

WooCommerce – Can’t add a inside the return

I’m using the following code to change the add to cart button text in WooCommerce.

JavaScript

The issue is in this bit of code here:

JavaScript

I’m trying to add a <span> inside the outputted HTML but it’s not including the < and >:

JavaScript

I’ve tried for hours to try and figure out why.

Any help would be greatly appreciated.

Thanks

Advertisement

Answer

This is caused by strip_tags function, see here for its usage

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement