Advertisement
tommyosheawebdesign

woocommerce lotto change fail msg

Sep 8th, 2020
1,389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1.  
  2.  
  3. <?php } elseif( '2' === $product->get_lottery_closed() && 'yes' === get_post_meta( $post->ID, '_lottery_manualy_winners', true ) && empty($lottery_winers) ){
  4.         esc_html_e('Please be patient. We are picking winners!','wc-lottery-pn');
  5.     } else {
  6.    
  7.         if ( $product->get_lottery_closed() == 2 ) {?>
  8.             <?php if ($product->is_user_participating()) : ?>
  9.                     <?php if(in_array($current_user->ID, $lottery_winers)): ?>
  10.                             <p><?php _e('Congratulations! You are winner!','wc_lottery') ?></p>
  11.                     <?php else: ?>
  12.                             <p><?php _e('Sorry, better luck next time.','wc_lottery') ?></p>
  13.                     <?php endif; ?>    
  14.             <?php endif;?>
  15.         <?php } else{
  16.             if ( $product->get_lottery_fail_reason() == '1' ) { ?>
  17.                 <p><?php _e('','wc_lottery') ?></p>
  18.             <?php } elseif ( $product->get_lottery_fail_reason() == '2' ) { ?>
  19.                 <p><?php _e('Lottery failed because there was not enough participants','wc_lottery') ?></p>
  20.             <?php } ?>
  21.         <?php } ?>
  22.    
  23. <?php }
  24.  
  25. wp-content/plugins/woocommerce-lottery-pick-number/templates/single-product
  26.  
  27. Line 26
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement