strangerstudios/pmpro-member-history

Show all orders in history "Orders" tab

Closed this issue · 2 comments

This tab currently limits the view to exclude certain order statuses. It should be updated to include any status and we could possibly offer a filter to adjust which status are included.

$invoices = $wpdb->get_results("SELECT mo.*, UNIX_TIMESTAMP(mo.timestamp) as timestamp, du.code_id as code_id FROM $wpdb->pmpro_membership_orders mo LEFT JOIN $wpdb->pmpro_discount_codes_uses du ON mo.id = du.order_id WHERE mo.user_id = '$user->ID' AND (mo.status = 'success' OR mo.status = 'cancelled' OR mo.status = 'refunded' OR mo.status = '') ORDER BY mo.timestamp DESC");

That feature is exactly what we were hoping and looking for 👍

We would love to include the status 'pending' there, and could do exactly this if a filter would be added 🙃

We may still consider adding a filter for what status to show, otherwise this PR resolves the issue: #12