_wpsc_action_update_product_stats

Update product stats when a purchase log containing it changes status.

Description

_wpsc_action_update_product_stats( (int) $log_id, (int) $new_status, (int) $old_status, (WPSC_Purchase_Log) $log ); 

Parameters (4)

0. $log_id (int)
Purchase Log ID
1. $new_status (int)
The new status.
2. $old_status (int)
The old status.
3. $log (WPSC_Purchase_Log)
Purchase Log

Usage

  1. if ( !function_exists( '_wpsc_action_update_product_stats' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'wp-ecommerce/wpsc-includes/stats.functions.php'; 
  3.  
  4. // Purchase Log ID 
  5. $log_id = -1; 
  6.  
  7. // The new status. 
  8. $new_status = -1; 
  9.  
  10. // The old status. 
  11. $old_status = -1; 
  12.  
  13. // Purchase Log 
  14. $log = null; 
  15.  
  16. // NOTICE! Understand what this does before running. 
  17. $result = _wpsc_action_update_product_stats($log_id, $new_status, $old_status, $log); 
  18.  

Defined (1)

The function is defined in the following location(s).

/wpsc-includes/stats.functions.php