Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$4
Show/Hide statement for Woocommerce 'Paying Customers'
<div id="commentformcheck">
<?php
$paying_customer = get_user_meta( $user_id, 'paying_customer', true );
if ( $paying_customer) {?>
<div id="commentform">
<?php
myrp_api_comment_field_form_table();
myrp_api_ratings_form_table();
genesis_do_comment_form();
?>
</div>
<?php } else { ?>
<h3>You must make a purchase to leave a review</h3>
<?php} ?>This part get_user_meta( $user_id, 'paying_customer', true ) was given to me by the woothemes support
This question has been answered.
ktrusak | 07/27/12 at 11:04am
Edit
(3) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
07/27/12
11:17amMichael Caputo says:
<div id="commentformcheck">
<?php
$paying_customer = get_user_meta( $user_id, 'paying_customer', true );
if ( $paying_customer != '' ) {?>
<div id="commentform">
<?php
myrp_api_comment_field_form_table();
myrp_api_ratings_form_table();
genesis_do_comment_form();
?>
</div>
<?php } else { ?>
<h3>You must make a purchase to leave a review</h3>
<?php} ?>
</div>
Previous versions of this answer: 07/27/12 at 11:17am
- 07/27/12 11:13am
ktrusak says:It is still breaking the page when I insert that code
Thanks for the reply - 07/27/12 11:17am
Michael Caputo says:Any chance I can see the page where you're putting the code?
- 07/27/12 11:17am
Michael Caputo says:I added a closing div to my original code
- 07/27/12 11:13am
-

Last edited:
07/27/12
12:02pmArnav Joy says:try this
<div id="commentformcheck">
<?php
global $user_id;
$paying_customer = get_user_meta( $user_id, 'paying_customer', true );
if ( $paying_customer) {?>
<div id="commentform">
<?php
myrp_api_comment_field_form_table();
myrp_api_ratings_form_table();
genesis_do_comment_form();
?>
</div>
<?php } else { ?>
<h3>You must make a purchase to leave a review</h3>
<?php} ?>
- 07/27/12 12:06pm
ktrusak says:Thanks for the reply
It still isn't working though, I am not sure what is going wrong - 07/27/12 12:10pm
Arnav Joy says:what you are getting right now..
can you show me the url
can you show whole code of the page - 07/27/12 1:22pm
Arnav Joy says:try this
http://pastie.org/4343751
and if it does not works then provide me access to site i will make that correct
- 07/27/12 12:06pm
-

Last edited:
07/27/12
3:38pmMartin Pham says:try this
<div id="commentformcheck">
<?php
$user_id = get_current_user_id();
$paying_customer = get_user_meta( $user_id, 'paying_customer', true );
if ( $paying_customer) {?>
<div id="commentform">
<?php
myrp_api_comment_field_form_table();
myrp_api_ratings_form_table();
genesis_do_comment_form();
?>
</div>
<?php } else { ?>
<h3>You must make a purchase to leave a review</h3>
<?php} ?>
- 07/28/12 10:15am
ktrusak says:This worked, thanks Martin
- 07/28/12 10:15am
This question has expired.
Gabriel Reguly, Arnav Joy, Manoj Raj, ktrusak voted on this question.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
