• Hi!
    i have installed this fantastic theme and i’m very happy!
    i have not any problems for other plugins etc. but only one issue: the “on sale” label on products in woocommerce.
    i have been try to modify there with functions.php but it’s not working.
    i have been searched in all web and i have not response 🙁
    can you help me please??
    Thank you

    PS. because i’m work on local web server i can’t post the link.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author apollo13themes

    (@apollo13themes)

    Hello Tommy 🙂

    What do you want to modify about this label?
    It comes directly from WooCommerce, our theme is only styling it.

    With kind regards.
    Air.

    Thread Starter Tommy Tortorelli

    (@tommytortorelli)

    Hi Air! 😛
    Nice to see your feedback! 😛
    i need to modify the text in the label…because i don’t need a “Sale!” text but other text.

    Kind Regards

    Tommy

    Theme Author apollo13themes

    (@apollo13themes)

    Hey 🙂

    Sorry, I was wrong, as we modify label part a bit.
    You can add this code to your functions.php and override our changes as you wish:

    function apollo13framework_wc_single_product_labels() {
        /* @var $product WC_Product */
        global $product;
    
        $html = '';
    
        //labels
        //out of stock
        if(!$product->is_in_stock()){
            $html .= '<span class="ribbon out-of-stock"><em>'.esc_html__( 'Out of stock', 'rife-free' ).'</em></span>';
        }
        else{
            //sale
            if($product->is_on_sale()){
                $html .= '<span class="ribbon sale"><em>'.esc_html__( 'Sale', 'rife-free' ).'</em></span>';
            }
            //new
            if(apollo13framework_is_product_new()){
                $html .= '<span class="ribbon new"><em>'.esc_html__( 'New', 'rife-free' ).'</em></span>';
            }
        }
    
        if(strlen($html)){
            echo '<div class="product-labels">'.wp_kses_post($html).'</div>';
        }
    }

    We generally do code help only for Rife Pro with support users, but have this free one on me 🙂

    With kind regards.
    Air.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Modify “On Sale” products labels’ is closed to new replies.