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>';
Thread Starter
R302
(@r302)
Thanks.
Ok -> Yes, I see a name instead of a slug in the second case.
But, the settings: ‘Variation name’ and ‘Include the product name before variation name’ do not work.
The plugin does not respond to changes in values: Yes – No
Now I will try the first case: change line 651
Thread Starter
R302
(@r302)
Yes, Line 651 is a horror …. Sorry
I reinstalled the plugin.
Thread Starter
R302
(@r302)
Perhaps my option is to wait for the update. Line 651 – horror. Line 798 – not sure if it’s better …
Hi @r302
As I mentioned on my second reply, the line 651 change wasn’t a solution so please disregard that.
The second solution works but it hard-codes the variant name (meaning all the options from the plugin settings won’t work). This is meant to be a quick solution that I came up in just a couple of hours to be able to just display the variant name.
If you need a proper fix that will also incorporate the settings from the Plugin option page, you’ll either need for the plugin developer to fix it or to hire a developer to code it for you 🙂
Good luck!
The plugin dev just released a fix v.3.0.1