/** * Render the Email Column * * @access public * @since 1.0 * * @param array $payment Contains all the data of the payment * * @return string Data shown in the Email column */ public function column_email($payment) { $row_actions = array(); if (give_is_payment_complete($payment->ID)) { $row_actions['email_links'] = '<a href="' . add_query_arg(array('give-action' => 'email_links', 'purchase_id' => $payment->ID), $this->base_url) . '">' . __('Resend Donation Receipt', 'give') . '</a>'; } $row_actions['delete'] = '<a href="' . wp_nonce_url(add_query_arg(array('give-action' => 'delete_payment', 'purchase_id' => $payment->ID), $this->base_url), 'give_payment_nonce') . '">' . __('Delete', 'give') . '</a>'; $row_actions = apply_filters('give_payment_row_actions', $row_actions, $payment); if (!isset($payment->user_info['email'])) { $payment->user_info['email'] = __('(unknown)', 'give'); } $value = '<span class="give-email-column-value">' . $payment->user_info['email'] . '</span>' . $this->row_actions($row_actions); return apply_filters('give_payments_table_column', $value, $payment->ID, 'email'); }
</div> <!-- /.inside --> <div class="give-order-update-box give-admin-box"> <?php do_action('give_view_order_details_update_before', $payment_id); ?> <div id="major-publishing-actions"> <div id="publishing-action"> <input type="submit" class="button button-primary right" value="<?php esc_attr_e('Save Payment', 'give'); ?> " /> <?php if (give_is_payment_complete($payment_id)) { ?> <a href="<?php echo esc_url(add_query_arg(array('give-action' => 'email_links', 'purchase_id' => $payment_id))); ?> " id="give-resend-receipt" class="button-secondary right"><?php _e('Resend Receipt', 'give'); ?> </a> <?php } ?> </div> <div class="clear"></div> </div> <?php
/** * Get Row Actions * * @since 1.6 * * @return mixed|void */ function get_row_actions($payment) { $row_actions = array(); $email = give_get_payment_user_email($payment->ID); // Add search term string back to base URL $search_terms = isset($_GET['s']) ? trim($_GET['s']) : ''; if (!empty($search_terms)) { $this->base_url = add_query_arg('s', $search_terms, $this->base_url); } if (give_is_payment_complete($payment->ID) && !empty($email)) { $row_actions['email_links'] = '<a href="' . add_query_arg(array('give-action' => 'email_links', 'purchase_id' => $payment->ID), $this->base_url) . '">' . esc_html__('Resend Donation Receipt', 'give') . '</a>'; } $row_actions['delete'] = '<a href="' . wp_nonce_url(add_query_arg(array('give-action' => 'delete_payment', 'purchase_id' => $payment->ID), $this->base_url), 'give_payment_nonce') . '">' . esc_html__('Delete', 'give') . '</a>'; return apply_filters('give_payment_row_actions', $row_actions, $payment); }