Okay
  Public Ticket #2612719
Stock Label
Closed

Comments

  • danielegregorio started the conversation

    How can change the stock label on catalogue? 

  • danielegregorio replied

    I tried to change the label in this file: woocommerce-template-functions.php but doesn't works


    if (!function_exists('huntor_woocommerce_get_product_label_stock')) {
        function huntor_woocommerce_get_product_label_stock() {
            /**
             * @var $product WC_Product
             */
            global $product;
            if ($product->get_stock_status() == 'outofstock') {
                echo '<span class="stock-label outofstock"><span>' . esc_html__('Out Of Stock', 'huntor') . '</span></span>';
            } elseif ($product->get_stock_status() == 'instock') {
                echo '<span class="stock-label instock"><span>' . esc_html__('In Stock', 'huntor') . '</span></span>';
            } else {
                echo '<span class="stock-label onbackorder"><span>' . esc_html__('On backorder', 'huntor') . '</span></span>';
            }
        }
    }

    if (!function_exists('huntor_woocommerce_get_product_label_new')) {
        function huntor_woocommerce_get_product_label_new() {
            global $product;
            $newness_days = 30;
            $created      = strtotime($product->get_date_created());
            if ((time() - (60 * 60 * 24 * $newness_days)) < $created) {
                echo '<span class="new-label"><span>' . esc_html__('New!', 'huntor') . '</span></span>';
            }
        }
    }



  •  604
    Ha replied

    Hello Mate,

    You can search and change this text on Huntor-core plugin ( but when you update plugin, it will be remove this custom code )

    Hope it help!

    Thanks


    Support Team

    We are located in GMT +7 time zone and we answer all questions within 12-48 hours on weekdays. In some rare cases, the waiting time can be to 48 hours. Support tickets sent during weekends or public holidays will be processed next Monday or the next business day. 

    If you like our theme, Please vote it 5 stars. We are really really appreciate your vote : 

    To vote go to http://themeforest.net/downloads then follow that link: http://screencast.com/t/ylPjXebiCIOE 
    Thanks and have a nice day!