I'm struggling with this code
-
Hi,
I’m adding this to the Product Short Description to try and change the “Add to Cart” to “Pre-order”, but it doesn’t work (N.B. the PHP works fine when adding it to functions.php, but that changes all the buttons and I only want it for some pages):
[insert_php]
add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' ); add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' ); add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_cart_button_text' ); function woo_custom_cart_button_text() { return __( 'Pre-order', 'woocommerce' ); }
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
[/insert_php]
Any idea why this is?
The theme I’m using is woocommerce one called Blaszok.Any help will be deeply appreciated as I’m at my wits end with this ??
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘I'm struggling with this code’ is closed to new replies.