get_totals();
// $hits = isset( $totals['hits'] ) ? intval( $totals['hits'] ) : 0;
$visits = isset( $totals['visits'] ) ? intval( $totals['visits'] ) : 0;
$referrals = isset( $totals['referrals'] ) ? intval( $totals['referrals'] ) : 0;
$amounts = array();
if ( isset( $totals['amounts_by_currency'] ) ) {
foreach ( $totals['amounts_by_currency'] as $currency_id => $amount ) {
$amounts[$currency_id] = round( $amount, affiliates_get_referral_amount_decimals( 'display' ), PHP_ROUND_HALF_UP );
$amounts[$currency_id] = Affiliates_Math::add( '0', $amounts[$currency_id], affiliates_get_referral_amount_decimals( 'display' ) );
}
}
$pname = get_option( 'aff_pname', AFFILIATES_PNAME );
$encoded_id = affiliates_encode_affiliate_id( $section->get_affiliate_id() );
$link_info = sprintf(
/* translators: parameter, URL */
__( 'You can also add %1$s to any link on %2$s to track referrals from your account.', 'affiliates' ),
sprintf( '?%s=%s', esc_html( $pname ), esc_html( $encoded_id ) ),
esc_url( home_url() )
);
?>