The woocs_side_switcher_data filter passes the whole configuration array of the side switcher, assembled from the plugin settings, before the panel is rendered. Use it to change the skin, position, colours or field templates without touching the saved options — for example a different position on mobile.
add_filter('woocs_side_switcher_data', function ($data) {
if (wp_is_mobile()) {
$data['side'] = 'right';
$data['top'] = '40px';
}
return $data;
});
Parameters:
$data (array) with the keys:
skin - classic_blocks by default
side - left or right
top - offset from the top of the viewport, a CSS length
color - panel colour
hover_color - colour on hover
basic_field - template of the visible line, default __CODE__ __SIGN__
add_field - template of the expanded line, default __DESCR__ __FLAG__
Returns:
- (array) the configuration to render with
Note: the placeholders __CODE__, __SIGN__, __DESCR__ and __FLAG__ are replaced per currency, so they can be reordered or dropped inside the field templates.