Created
April 5, 2018 17:25
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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