Skip to content

Instantly share code, notes, and snippets.

@pablo-sg-pacheco
Created April 5, 2018 17:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pablo-sg-pacheco/eae2804cb0d06c835f1ca63cbee9a52f to your computer and use it in GitHub Desktop.
Save pablo-sg-pacheco/eae2804cb0d06c835f1ca63cbee9a52f to your computer and use it in GitHub Desktop.
Make "Color or Image Variation Swatches for WooCommerce" plugin compatible with Savoy theme
<?php
add_action( 'wp_head', function () {
?>
<style>
.label.alg-wc-civs-term {
width: auto !important;
padding: 0 !important;
border: 2px solid #ccc !important;
line-height: auto !important;
}
.alg-wc-civs-attribute {
margin-top: 0 !important;
margin-bottom: 11px !important;
}
.alg_wc_civs_no_before::before {
content: " " !important;
}
.variations tr .alg-wc-civs-term {
margin-top: 11px !important;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
civs_original_element = document.querySelectorAll('.alg-wc-civs-original-select');
if (civs_original_element != null) {
[].forEach.call(civs_original_element, function (obj) {
obj.parentNode.classList.add('alg_wc_civs_no_before');
});
}
});
</script>
<?php
} );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment