• Hi,

    After update displaying attribute name lowercase instead of correct name. For example, if I have a product with sizes: S/M, L/XL and XXL then before the update plugin displayed the following:
    Choose an option:

    Size: S/M
    Size: L/XL
    Size: XXL

    But after update, it displays:
    Size: s-m
    Size: l-xl
    Size: XXL

    Looks like it displaying variable attribute slugs instead of correct names.

Viewing 4 replies - 1 through 4 (of 4 total)
  • +1 on this

    Slug is displayed in favour of attribute name

    Hi, I just posted our temporary fix on a separate message, but here it is as well just in case:

    If you don’t mind editing the plugin files, simply change line 651 on the wpc-variations-radio-buttons.php file from:

    $attrs[ ‘attribute_’ . $k ][] = $term->slug;

    to

    $attrs[ ‘attribute_’ . $k ][] = $term->name;

    Hopefully the plugin developer will fix this in a future update so we don’t have to modify source files.

    Hope this helps!

    Sorry, the solution was a little bit trickier than anticipated. Please ignore my previous post. This should to the trick:

    Change the code starting on line 798 on the wpc-variations-radio-buttons.php file from:

    echo '<div class="woovr-variation-info">';
    $child_info = '<div class="woovr-variation-name">' . apply_filters( 'woovr_variation_name', $child_name, $child_product ) . '</div>';

    to

    $temp_product_name = $child_product->get_name();
    $temp_product_separator = '-';
    $temp_display_product = substr($temp_product_name, strpos($temp_product_name,$temp_product_separator)+strlen($temp_product_separator));
    
    echo '<div class="woovr-variation-info">';
    $child_info = '<div class="woovr-variation-name">' . $temp_display_product . '</div>';

    @fernet_con_cola that worked!! Thank you for the temporary fix! 🙂

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

The topic ‘After update variable attribute name lowercase/slug.’ is closed to new replies.