• Resolved blueg2017

    (@blueg2017)


    @pidzejj posted this up in the generic wordpress issue forum, but looks like he hasn’t done it here yet. I have the same issue…so I’m going to re-post for him.

    Hello. I have such a problem with woocommerce plugin. Since last upgrade of woocommerce to last version I can see “×” instad “x” in dimension section in variant product. So I can see for ex. “&15times;15×15cm” instead “15 x 15 x 15cm”.

    Official support recommends me to disable every plugin (try to plugin conflict) and activate storefront theme. I trie both of theese solvings and still no success (this means that problem could be in original woocommerce plugin). You can watch screenshot of this issue here: https://www.designbydenisa.cz/wp-content/uploads/2018/11/issue.jpg

Viewing 5 replies - 1 through 5 (of 5 total)
  • Now I have a solution. Some guy from another forum gave me this code:

    add_filter( 'woocommerce_format_dimensions', 'change_formated_product_dimentions', 10, 2 );
    function change_formated_product_dimentions( $dimension_string, $dimensions ){
        if ( empty( $dimension_string ) )
            return __( 'N/A', 'woocommerce' );
    
        $dimensions = array_filter( array_map( 'wc_format_localized_decimal', $dimensions ) );
    
        return implode( ' x ',  $dimensions ) . get_option( 'woocommerce_dimension_unit' );
    }

    Use it in function.php
    It causes change of formatting in original woocommerce php file.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @blueg2017

    Happy to see that @pidzejj found one solution.

    > Official support recommends me to disable every plugin (try to plugin conflict) and activate storefront theme

    We recommend this as often it will clear up any problems. I run the vanilla Storefront theme on my site, you can see I have no display problems for this product dimensions: https://doug.press/product/grounded-coffee/

    I’m going to mark this as resolved as I cannot reproduce and a solution has been given – if you have any further questions, you can start a new thread.

    Thanks,

    dougaitken

    Yes for single product it worked also in my site but i am talking about variant product. The problem appeared in this type of product. (Not single)

    Thread Starter blueg2017

    (@blueg2017)

    @dougaitken you might want to keep this as un-resolved – I’m using a completely different theme and have the exact same issue since the update. Looking at a few of my other clients sites that didn’t upgrade to the latest version of WooCommerce (Running 3.4.4 and 3.3.5) I see that the variable product sizing reads the way it should. So it must be something with the latest update.

    To take this further, I went ahead and took the site that was using 3.3.5 and updated it to the latest version of Woocommerce and just as expected – the dimension field in the additional information tab on a variable product is now showing “×” instead of x.

    dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @pidzejj @blueg2017

    Got it!

    This is a known and patched issue which will ship in version 3.5.2 so I will keep this resolved since the core issue has been addressed and a fix is coming.

    Pull Request – https://github.com/woocommerce/woocommerce/pull/21844

    Thanks,

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Woocommerce variant product dimension display “&-times;” instead “x”’ is closed to new replies.