Created
February 21, 2017 16:11
-
-
Save bogdanpopa90/72e0a39b7cfa6c1209c3ff598463b462 to your computer and use it in GitHub Desktop.
Change Gravatar size for reviews section on single product in WooCommerce
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 | |
/** | |
* Change Gravatar size for reviews | |
*/ | |
function CUSTOM_woocommerce_review_display_gravatar( $comment ) { | |
echo get_avatar( $comment, apply_filters( 'woocommerce_review_gravatar_size', '145' ), '' ); | |
} | |
?> |
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 | |
// Remove default size | |
remove_action( 'woocommerce_review_before', 'woocommerce_review_display_gravatar', 10 ); | |
// Add the new one | |
add_action( 'woocommerce_review_before', 'CUSTOM_woocommerce_review_display_gravatar', 10 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment