You appear to be a bot. Output may be restricted
Description
Flushes the current user's purchase history transient when a payment status is updated
Usage
edd_clear_user_history_cache( $payment_id, $new_status, $old_status );
Parameters
- $payment_id
- ( int ) required – the ID number of the payment
- $new_status
- ( string ) required – the status of the payment, probably "publish"
- $old_status
- ( string ) required – the status of the payment prior to being marked as "complete", probably "pending"
Returns
void
Source
File name: easy-digital-downloads/includes/payments/actions.php
Lines:
1 to 8 of 8
function edd_clear_user_history_cache( $payment_id, $new_status, $old_status ) { $payment = new EDD_Payment( $payment_id ); if( ! empty( $payment->user_id ) ) { delete_transient( 'edd_user_' . $payment->user_id . '_purchases' ); } }