Answer the question
In order to leave comments, you need to log in
How to display html code in given php code?
Hello!
There is this code:
add_filter( 'woocommerce_product_single_add_to_cart_text', 'tb_woo_custom_cart_button_text' );
add_filter( 'woocommerce_product_add_to_cart_text', 'tb_woo_custom_cart_button_text' );
function tb_woo_custom_cart_button_text() {
return __( '+', 'woocommerce' );
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'tb_woo_custom_cart_button_text' );
add_filter( 'woocommerce_product_add_to_cart_text', 'tb_woo_custom_cart_button_text' );
function tb_woo_custom_cart_button_text() {
return __( '<img src="blabla">', 'woocommerce' );
}
<img src="blabla">
", and not a picture, what should I do? Answer the question
In order to leave comments, you need to log in
Redefine the button output template or insert a background through a pseudo-element. Filters personally did not work for me and Google did not help
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question