<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $campoal_options;
global $post;
global $current_user;

// Check user is loggedin or not, if not redirect to login page
conikal_redirect_login();

// user dashboard link
$user_dashboard_page = isset($campoal_options['conikal_page_dashboard_user_field']) ? $campoal_options['conikal_page_dashboard_user_field'] : 0;
$user_dashboard_page = ($user_dashboard_page ? get_permalink($user_dashboard_page) : '');

$donation_id = isset($_GET['donation_id']) ? sanitize_text_field($_GET['donation_id']) : false;

echo give_display_donation_receipt(array(
        'id'             => $donation_id,
        'error'          => esc_html__('You are missing the donation id to view this donation receipt.', 'campoal'),
        'price'          => true,
        'donor'          => true,
        'date'           => true,
        'payment_method' => true,
        'payment_id'     => true,
        'payment_status' => true,
        'company_name'   => true,
        'status_notice'  => true,
    )
);