• Hope someone can help me?

    Just updated to wordpress 3.8.1 and woocommerce to 2.1.2.

    Sadly I am not using a child theme as i seem to run into layout issues when i do.

    I want to change the text on the “add to cart”/ “read more” button, however the code i use to change (in woocommerce/templates/loop/add-to-cart.php) no longer has the code i use to change. Could someone help me find where and how i can chance the text (to “out of stock”)

    Thanks in advance for any help.

    Regards, Tim

    here is a like to my site:
    FJ’s Handbags

Viewing 1 replies (of 1 total)
  • In your child theme functions.php

    /*
    * replace read more buttons for out of stock items
    **/
    if (!function_exists('woocommerce_template_loop_add_to_cart')) {
    function woocommerce_template_loop_add_to_cart() {
    global $product;
    if (!$product->is_in_stock()) {
    	echo '<a href="'.get_permalink().'" rel="nofollow" class="button add_to_cart_button more_info_button out_stock_button">Out of Stock</a>';
    }
    else
    {
    	woocommerce_get_template('loop/add-to-cart.php');
    }
    }
    }

Viewing 1 replies (of 1 total)
  • The topic ‘woocommerce "read more" button’ is closed to new replies.