Skip to content

Instantly share code, notes, and snippets.

@cam5
Created September 18, 2013 00:24
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cam5/6602736 to your computer and use it in GitHub Desktop.
Save cam5/6602736 to your computer and use it in GitHub Desktop.
I used a few lines in the `single-product-reviews.php` woocommerce template to unhook jetpack on only product pages. Otherwise, it overrides the review form. Just calling the `Jetpack_Comments` class and removing those actions before the `comment_form()` was enough to selectively deactivate 'em. Note: your `single-product-reviews.php` might be i…
$jp = new Jetpack_Comments;
remove_action('comment_form_before', array($jp, 'comment_form_before'));
remove_action('comment_form_after', array($jp, 'comment_form_after'));`
comment_form( apply_filters( 'woocommerce_product_review_comment_form_args', $comment_form ) );
@cam5
Copy link
Author

cam5 commented Feb 26, 2014

This should give you the basics of where it ought to go: http://docs.woothemes.com/document/template-structure/

/themedir/woocommerce/single-product-reviews.php is where mine lives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment