• Resolved Imagemoegnd

    (@moegnd)


    Hi,

    So I’m using a snippet to change the price view on my Woocommerce from a range to from:

    I’m using this snippet and its working fine but I only want it to work on my English site.

    function iconic_format_price_range( $price, $from, $to ) {
    return sprintf( ‘%s: %s’, __( ‘from’, ‘iconic’ ), wc_price( $from ) );
    }

    add_filter( ‘woocommerce_format_price_range’, ‘iconic_format_price_range’, 10, 3 );

    Then I want to make another one to work only on the Arabic version of the website:

    function iconic_format_price_range( $price, $from, $to ) {
    return sprintf( ‘%s: %s’, __( ‘من’, ‘iconic’ ), wc_price( $from ) );
    }

    add_filter( ‘woocommerce_format_price_range’, ‘iconic_format_price_range’, 10, 3 );

    How is that possible?

    Regards

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Snippets for multi-language site’ is closed to new replies.