Sammy30
10/6/2019 - 7:53 PM

fund_raised.php

<!--
ethis.co.id / httpdocs / wp-content / plugins / wp-crowdfunding / wpneotemplate / woocommerce / ethis / include / loop / fund_raised.php
-->

<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
$raised_percent = WPNEOCF()->getFundRaisedPercentFormat();
$raised = 0;
$total_raised = WPNEOCF()->totalFundRaisedByCampaign();
if ($total_raised){
    $raised = $total_raised;
}
?>
	<div class="wpneo-fund-raised">
		<div class="wpneo-meta-name"><?php _e('Raised', 'wp-crowdfunding'); ?></div>
		<div class="wpneo-meta-desc"><?php echo wc_price($raised); ?></div>
	</div>
	<?php
	$days_remaining = apply_filters('date_expired_msg', __('0', 'wp-crowdfunding'));
if (WPNEOCF()->dateRemaining()){
    $days_remaining = apply_filters('date_remaining_msg', __(WPNEOCF()->dateRemaining(), 'wp-crowdfunding'));
}

$wpneo_campaign_end_method = get_post_meta(get_the_ID(), 'wpneo_campaign_end_method', true);

if ($wpneo_campaign_end_method != 'never_end'){ ?>
    <div class="wpneo-time-remaining">
        <div class="wpneo-meta-name"><?php _e('Time Remaining', 'wp-crowdfunding'); ?></div>
        <div class="wpneo-meta-desc"><?php echo $days_remaining; ?> day(s) to go</div>
    </div>
<?php } ?>
</div>

\!h -----edited below----

<?php
if ( ! defined( 'ABSPATH' ) ) {
    exit; // Exit if accessed directly
}
$wpneo_campaign_end_method = get_post_meta(get_the_ID(), 'wpneo_campaign_end_method', true);
?>
<?php if (wpneo_crowdfunding_get_campaigns_location()){ ?>
    <div class="wpneo-location-wrapper">
        <i class="wpneo-icon wpneo-icon-location"></i>
        <span><?php echo wpneo_crowdfunding_get_campaigns_location(); ?></span>
    </div>
<?php } ?>
<div class="campaign-funding-info">
    <ul>
		
        <li><span class="info-text"><?php _e('Target', 'wp-crowdfunding') ?></span>
        <p class="funding-amount"><?php echo wpneo_crowdfunding_price(wpneo_crowdfunding_get_total_goal_by_campaign(get_the_ID())); ?></p>
        </li>
       <li><span class="info-text"><?php _e('Terkumpul', 'wp-crowdfunding') ?></span>
        <p class="funding-amount"><?php echo wpneo_crowdfunding_price(wpneo_crowdfunding_get_total_fund_raised_by_campaign()); ?></p>
        </li>
    <?php if ($wpneo_campaign_end_method != 'never_end'){
        ?>
        <li>
            <span class="info-text"><?php _e( 'Sisa Waktu','wp-crowdfunding' ); ?></span>
            <p class="funding-amount"><?php echo WPNEOCF()->dateRemaining(); ?> Hari Lagi</p>
        </li>
    <?php } ?>
    </ul>
</div>