• Hello everyone:
    So I’d like to have the badge out of stock in another language, but I dont see the string of text any place, for woocommerce plugin
    I’ve seen that, for Astra, you could use this:

    add_filter( ‘astra_woo_shop_out_of_stock_string’, ‘out_of_stock_callback’ );
    function out_of_stock_callback( $title ) {
    return ‘Sold’;
    }

    Problem is, that I’d like to translate “Sold” to another language, since I’ve got 2 languages on the website, but I’m unable to see how to do it,
    having “Sold” in english site version
    and “Vendido” in spanish site version

    Does anyone know how to do it?

Viewing 1 replies (of 1 total)
  • Thread Starter ntribrd

    (@ntribrd)

    Also I’ve seen that

    First, create a theme (lets call it “mytheme-hello”) with the code:

    <?php pll_e(‘Vendido’); ?>

    and if you enter on your funtions.php

    add_action(‘init’, function() {
    pll_register_string(‘mytheme-hello’, ‘Hello World’);
    });

    It shows the string on the polylang string, but It actually doesn’t translate it. Ideas?

Viewing 1 replies (of 1 total)
  • The topic ‘Out of stock (Woocommerce)’ is closed to new replies.