php - Hide price in Woocommece if user not activated -


i'm using woocommerce new wordpress store , want hide prices "pending" users, untill approve them.

i use new user approve plugin add "pending" status new users don't know how hide price. did somthing it's not working:

if (is_user_logged_in()) { $nua = pw_new_user_approve(); $status = $nua->get_user_status(get_current_user_id());     if ($status !== 'pending') {             // user logged in , approved.             if ($price_html = $product->get_price_html()) : ?>             <span class="price"><?php echo $price_html; ?></span>             <?php endif;         } } 

can me please?

i have exact same issue , found chance.

your code looks alright, chucked in blindly , fixed php errors via php syntax checker (googled it).

here working code, needed closed off on < ? php ? > tags properly, , curly braces { } , if/end if's slightly.

< ? php if (is_user_logged_in()) {

$nua = pw_new_user_approve(); $status = $nua->get_user_status(get_current_user_id());  if ($status !== 'pending') { ?>       <?php if ($price_html = $product->get_price_html()) : ?>         <span class="price"><?php echo $price_html; ?></span>       <?php endif; ?> 

< ? php }; }; ? >

** there no space between the < , ? , php, had write in here full code visible


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -