New Landing How can we help? Atelier How to change the In stock in something different ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Atelier
  • #316809
    iake
    Member
    Post count: 31

    Hello,
    i would like to change the text “in stock” in “made to order”, is it possible?
    Image attached for explaination! 🙂

    Attachments:
    You must be logged in to view attached files.
    #316829
    David Martin – Support
    Moderator
    Post count: 20834

    Please install and activate the supplied child theme, inside the child theme functions.php file paste this:

    add_filter( 'woocommerce_get_availability', 'sf_custom_get_availability', 1, 2);
    function sf_custom_get_availability( $availability, $_product ) {
        
        // Change In Stock Text
        if ( $_product->is_in_stock() ) {
            $availability['availability'] = __('Your In Stock Text!', 'swiftframework');
        }
        // Change Out of Stock Text
        if ( ! $_product->is_in_stock() ) {
            $availability['availability'] = __('Your Sold Out Text', 'swiftframework');
        }
        return $availability;
    }
    #316836
    iake
    Member
    Post count: 31

    I’ve tryied to modify the function.php by the ftp but when i put my text the website is white.
    thx

    #316838
    David Martin – Support
    Moderator
    Post count: 20834

    Can you add your FTP details?

    Thanks.

    #316842
    iake
    Member
    Post count: 31

    Solved! thx! I edited by using the editor on my hosting and not by filezilla!

    #316854
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Glad it’s sorted.

    -Rui

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register