• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / edd_clear_user_history_cache() – Flushes the current user’s purchase history transient when a payment status is updated

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' );
  }
}
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 8th April 2020

Primary Sidebar

Information

Function name: edd_clear_user_history_cache
Plugin ref: Easy Digital Downloads
Version: 2.9.26
Sourcefile: includes/payments/actions.php
File ref: includes/payments/actions.php
Deprecated?: No
API Letters: C,E,H,U

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 5.6.2
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites