Created
October 27, 2015 09:54
-
-
Save yratof/83bb7083e2a3b702a7ec to your computer and use it in GitHub Desktop.
Displat advanced custom fields to Woocommerce Reviews
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( 'woocommerce_review_before_comment_meta', 'comment_title' ); | |
function comment_title(){ | |
$field = get_field('title', 'comment_' . get_comment_ID()); | |
if($field){ | |
echo '<h4>' . $field .'</h4>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Can I get some clarification as to what is required to get this to work? Am i correct in assuming its to add a "title" to the reviews in woocommerce being populated by an ACF field?
Thanks!
T+