• Our company orders portal deals in 1000’s of product sales.

    I am trying to add a thousand separator to the quantity fields on the single product pages, basket page and the menu area which gives cart total.

    I’ve been trying to add in some custom code to my child theme functions page:

    // define the woocommerce_quantity callback
    function filter_woocommerce_quantity( $quantity, $product ) {

    // filter
    return number_format($stock_quantity,0,”.”,”,”);
    };

    // add the filter
    add_filter( ‘woocommerce_quantity’, ‘filter_woocommerce_quantity’, 10, 2 );

    So far, not luck.
    Is there anything obvious that i’m doing wrong, or is this a more complex problem?

  • The topic ‘Add thousand separator to product quantity fields’ is closed to new replies.