Located in: purchase-log.class.php

Functions that call this hook: WPSC_Purchase_Log::update_cache()

Arguments Accepted: $log

Version Introduced: 3.8.9

Description: This action is triggered when a purchase log’s object cache is updated.

Code in context:

[php firstline=”127″ highlight=”137″]

public static function update_cache( &$log ) {

// wpsc_purchase_logs stores the data array, while wpsc_purchase_logs_sessionid stores the

// log id that’s associated with the sessionid

$id = $log->get( ‘id’ );

wp_cache_set( $id, $log->data, ‘wpsc_purchase_logs’ );

if ( $sessionid = $log->get( ‘sessionid’ ) )

wp_cache_set( $sessionid, $id, ‘wpsc_purchase_logs_sessionid’ );

wp_cache_set( $id, $log->cart_contents, ‘wpsc_purchase_log_cart_contents’ );

do_action( ‘wpsc_purchase_log_update_cache’, $log );