Skip to content

Instantly share code, notes, and snippets.

@gstricklind gstricklind/custom.js

Last active Mar 9, 2019
What would you like to do?
Add Write A Review link to woocommerce product pages
$('.woocommerce-product-rating .woocommerce-review-link').after(' | <a class="write-your-review" href="#tab-reviews">Write Your Review</a>');
$('.write-your-review').click( function () {
$('.tabs li').removeClass('active');
$('.woocommerce-Tabs-panel').attr("style", "display:none");
$('.woocommerce-Tabs-panel--reviews').attr("style", "display:block");
$('html, body').animate({
scrollTop: $("#commentform").offset().top -200
}, 1500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.