Probably an error in functions.php

  • Resolved
    Posted in: Fundingpress  
  • Member
    alessiobandini
    February 8, 2017 at 4:20 pm #95386

    Hi,

    I’m building a new template for ended projects and I’m working on functions.php.
    I’ve found that in some “if” there’s a wrong comparision:
    <?php if($funded_amount > $target or $funded_amount == $targe){ ?>
    <?php esc_html_e(‘Successful’, ‘fundingpress’); ?>
    <?php }else{ ?>
    <?php esc_html_e(‘Unsuccessful’, ‘fundingpress’); ?>
    <?php } ?>
    <?php } ?>

    The variable “$targe” is not defined at all, so the “if” give always “Succesful” end.
    Is it possibile that the correct “if” should be:

    <?php if($funded_amount >= $target){ ?>
    <?php esc_html_e(‘Successful’, ‘fundingpress’); ?>
    <?php }else{ ?>
    <?php esc_html_e(‘Unsuccessful’, ‘fundingpress’); ?>
    <?php } ?>
    <?php } ?>

    Thank you.

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.