Replies: 0
Hello,
Is there php code to change the “Add To Cart” button with custom text and a custom URL globally?
I found this code and it works to change the text on the button on the product page: https://treeologie.com/product/caddy/, but it did not change the “add to cart text on this page: https://treeologie.com/shop/
// To change add to cart text on single product page
add_filter( ‘woocommerce_product_single_add_to_cart_text’, ‘woocommerce_custom_single_add_to_cart_text’ );
function woocommerce_custom_single_add_to_cart_text() {
return __( ‘Buy Now’, ‘woocommerce’ );
And, instead of the product being added to the cart, I want to add a url to the buttons when clicked on to my Amazon store. Is there any code for these two things?
I prefer code, but if there are good plugins, I am open to those too. Thanks for your help.