/var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/templates
Edit: /var/www/vhosts/ihelp.ro/ajutam.ro/wp-content/plugins/give/templates/history-donations.php (9145B)
session->get( 'give_donation_history_args' );
// User's Donations.
if ( is_user_logged_in() ) {
$donations = give_get_users_donations( get_current_user_id(), 20, true, 'any' );
} elseif ( Give()->email_access->token_exists ) {
// Email Access Token?
$donations = give_get_users_donations( 0, 20, true, 'any' );
} elseif (
false !== Give()->session->get_session_expiration() ||
true === give_get_history_session()
) {
// Session active?
$email = Give()->session->get( 'give_email' );
$donor = Give()->donors->get_donor_by( 'email', $email );
$donations_count = count( explode( ',', $donor->payment_ids ) );
if ( $donations_count > give_get_limit_display_donations() ) {
// Restrict Security Email Access option, if donation count of a donor is less than or equal to limit.
if ( true !== Give_Cache::get( "give_cache_email_throttle_limit_exhausted_{$donor->id}" ) ) {
add_action( 'give_donation_history_table_end', 'give_donation_history_table_end' );
} else {
$value = Give()->email_access->verify_throttle / 60;
/**
* Filter to modify email access exceed notices message.
*
* @since 2.1.3
*
* @param string $message email access exceed notices message
* @param int $value email access exceed times
*
* @return string $message email access exceed notices message
*/
$message = (string) apply_filters(
'give_email_access_requests_exceed_notice',
sprintf(
__( 'Too many access email requests detected. Please wait %s before requesting a new donation history access link.', 'give' ),
sprintf( _n( '%s minute', '%s minutes', $value, 'give' ), $value )
),
$value
);
give_set_error(
'give-limited-throttle',
$message
);
}
$donations = give_get_users_donations( $email, give_get_limit_display_donations(), true, 'any' );
} else {
$donations = give_get_users_donations( $email, 20, true, 'any' );
}
}
Give()->notices->render_frontend_notices( 0 );
if ( $donations ) : ?>
__( 'ID', 'give' ),
'date' => __( 'Date', 'give' ),
'donor' => __( 'Donor', 'give' ),
'amount' => __( 'Amount', 'give' ),
'status' => __( 'Status', 'give' ),
'payment_method' => __( 'Payment Method', 'give' ),
'details' => __( 'Details', 'give' ),
);
?>
elements to the header, before other headers in the row.
*
* @since 1.7
*/
do_action( 'give_donation_history_header_before' );
foreach ( $donation_history_args as $index => $value ) {
if ( filter_var( $donation_history_args[ $index ], FILTER_VALIDATE_BOOLEAN ) ) :
echo sprintf(
'| %2$s | ',
$index,
$table_headings[ $index ]
);
endif;
}
/**
* Fires in current user donation history table, after the header row ends.
*
* Allows you to add new elements to the header, after other headers in the row.
*
* @since 1.7
*/
do_action( 'give_donation_history_header_after' );
?>
|
ID );
?>
elements to the row, before other elements in the row.
*
* @since 1.7
*
* @param int $post_id The ID of the post.
* @param mixed $donation_data Payment meta data.
*/
do_action( 'give_donation_history_row_start', $post->ID, $donation_data );
if ( filter_var( $donation_history_args['id'], FILTER_VALIDATE_BOOLEAN ) ) :
echo sprintf(
'| %2$s%1$s | ',
give_get_payment_number( $post->ID ),
esc_html( $table_headings['id'] )
);
endif;
if ( filter_var( $donation_history_args['date'], FILTER_VALIDATE_BOOLEAN ) ) :
echo sprintf(
'%2$s%1$s | ',
date_i18n( give_date_format(), strtotime( get_post_field( 'post_date', $post->ID ) ) ),
esc_html( $table_headings['date'] )
);
endif;
if ( filter_var( $donation_history_args['donor'], FILTER_VALIDATE_BOOLEAN ) ) :
echo sprintf(
'%2$s%1$s | ',
give_get_donor_name_by( $post->ID ),
$table_headings['donor']
);
endif;
?>
%1$s', esc_html( $table_headings['amount'] ) ); ?>
ID );
$donation_amount = give_donation_amount( $post->ID, true );
/**
* Filters the donation amount on Donation History Page.
*
* @param int $donation_amount Donation Amount.
* @param int $post_id Donation ID.
*
* @since 1.8.13
*
* @return int
*/
echo apply_filters( 'give_donation_history_row_amount', $donation_amount, $post->ID );
?>
|
%2$s%1$s',
give_get_payment_status( $post, true ),
esc_html( $table_headings['status'] )
);
endif;
if ( filter_var( $donation_history_args['payment_method'], FILTER_VALIDATE_BOOLEAN ) ) :
echo sprintf(
'%2$s%1$s | ',
give_get_gateway_checkout_label( give_get_payment_gateway( $post->ID ) ),
esc_html( $table_headings['payment_method'] )
);
endif;
?>
post_status && 'subscription' !== $post->post_status ) :
echo sprintf(
'%4$s%3$s',
esc_url(
add_query_arg(
'donation_id',
$post->ID,
give_get_history_page_uri()
)
),
$post->post_status,
__( 'View', 'give' ) . ' ' . give_get_payment_status( $post, true ) . ' »',
esc_html( $table_headings['details'] )
);
else :
echo sprintf(
'%3$s%2$s',
esc_url(
add_query_arg(
'donation_id',
$post->ID,
give_get_history_page_uri()
)
),
__( 'View Receipt »', 'give' ),
esc_html( $table_headings['details'] )
);
endif;
?>
|
elements to the row, after other elements in the row.
*
* @since 1.7
*
* @param int $post_id The ID of the post.
* @param mixed $donation_data Payment meta data.
*/
do_action( 'give_donation_history_row_end', $post->ID, $donation_data );
?>
elements to the row, after other elements in the row.
*
* @since 1.8.17
*/
do_action( 'give_donation_history_table_end' );
?>