@terzag
Hope you already have the solution by now. I had exactly the same wish as you have (styling the currently selected variation), and after diving into the code I made a very simple change. This is what you do:
01. After downloading and installing this plugin go to ../plugins/wpc-variations-radio-buttons/assets/js and open frontend.js file.
02. On line 6 you will see the following code
$('body').on('click', '.woovr-variation-radio', function() {
var _this = $(this);
var _variations = _this.closest('.woovr-variations');
var _variations_form = _this.closest('.variations_form');
woovr_do_select(_this, _variations, _variations_form);
_this.find('input[type="radio"]').prop('checked', true);
});
03. After inserting the code, this is what it should look like
$('body').on('click', '.woovr-variation-radio', function() {
// Remove all 'selected' classes
$('.woovr-variation-radio').removeClass('selected');
// Add class 'selected' to clicked item
var _this = $(this).addClass('selected');
var _variations = _this.closest('.woovr-variations');
var _variations_form = _this.closest('.variations_form');
woovr_do_select(_this, _variations, _variations_form);
_this.find('input[type="radio"]').prop('checked', true);
});
That’s it! @wpclever please update these kind of requests. Frontend is very, VERY IMPORTANT(!!!), when having multiple radio buttons it is necessary to have a visual on which variation is selected/active.