-
-
Save searchwpgists/8fc7c47f0fbf703f055b559880b7a168 to your computer and use it in GitHub Desktop.
Customize Comments Attribute label for Products custom post type in SearchWP
This file contains 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 | |
// Customize Comments Attribute label for Products custom post type in SearchWP. | |
add_filter( 'searchwp\source\attribute\label', function( $label ) { | |
if ( 'post.product' === $args['source'] && 'comments' === $args['attribute'] ) { | |
return 'Reviews'; | |
} else { | |
return $label; | |
} | |
}, 20, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment