Viewing 6 replies - 1 through 6 (of 6 total)
  • @zhuzh1

    is changing: https://www.screencast.com/t/9Jhi1MZE having any effect? You can find that in Woocommerce settings

    Thread Starter zhuzh1

    (@zhuzh1)

    Hi @wpriders

    I tried all four positions, “N/A” is still there.

    I also created a few new products, making sure nothing extra was added to product defn/desc. Unfortunately, “n/a” showed up for new products.

    Hey,

    add this to your themes function.php:

    /**
     * Remove N/A from prices
     */
    function my_text_strings( $translated_text, $text, $domain ) {
    	switch ( $translated_text ) {
    		case 'N/A' :
    			$translated_text = __( '', 'woocommerce' );
    			break;
    	}
    	return $translated_text;
    }
    add_filter( 'gettext', 'my_text_strings', 20, 3 );

    This code is tested and should work. Please tell me if it works for you too.

    BG
    Johannes

    • This reply was modified 6 years, 1 month ago by devjunkie.
    Thread Starter zhuzh1

    (@zhuzh1)

    hi, @devjunkie

    Thanks for your response to my questoin.

    The snippet does NOT seem to work.

    It also locks my console whenever I ran it.

    Any further advice?

    Please change the filter to:

    add_filter( ‘ngettext’, ‘my_text_strings’, 20, 3 );

    Thread Starter zhuzh1

    (@zhuzh1)

    Hari S. of Woocommerce advised me the following. That’s exactly the problem.

    “That’s interesting. Can you visit WooCommerce > Settings > Tax and go to the Price
    Display Suffix field to see what options you see there? Is it explicitly written N/A
    there, by any chance?

    https://cld.wthms.co/5iafK0
    Full Size: https://cld.wthms.co/5iafK0

    If so, can you leave the field blank, save changes, and try again?”

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Prices are displayed with a trailing “N/A”’ is closed to new replies.