Located in: admin.php

Functions that call this hook: wpsc_dashboard_widget()
Arguments Accepted: None
Version Introduced: 3.8

Description: wpsc_dashboard_widget() is the callback function for wp_add_dashboard_widget() The hook wpsc_admin_pre_activity is the very first thing called in this function and can be used to output any thing into the Sales Summary dashboard widget. WP-e-Commerce also uses this hook to create the content within the dashboard widget.

Similar hooks: wpsc_admin_post_activity – called within the same function but after WP-e-Commerce has displayed the “Sales Summary” content.

Use Case:
add_action(‘wpsc_admin_pre_activity’, ‘my_dashboard_widget_extra_content’);

function my_dashboard_widget_extra_content(){
//put whatever you want to display in the sales summary in here!

Code in context:
[php firstline=”533″ highlight=”535″]
// Add the dashboard widgets
wp_add_dashboard_widget( ‘wpsc_dashboard_news’, __( ‘Getshopped News’ , ‘wpsc’ ), ‘wpsc_dashboard_news’ );
wp_add_dashboard_widget( ‘wpsc_dashboard_widget’, __( ‘Sales Summary’, ‘wpsc’ ), ‘wpsc_dashboard_widget’ );
wp_add_dashboard_widget( ‘wpsc_quarterly_dashboard_widget’, __( ‘Sales by Quarter’, ‘wpsc’ ), ‘wpsc_quarterly_dashboard_widget’ );
wp_add_dashboard_widget( ‘wpsc_dashboard_4months_widget’, __( ‘Sales by Month’, ‘wpsc’ ), ‘wpsc_dashboard_4months_widget’ );

[php firstline="676" highlight="678"]
function wpsc_dashboard_widget() {
if ( current_user_can( ‘manage_options’ ) ) {
do_action( ‘wpsc_admin_pre_activity’ );
do_action( ‘wpsc_admin_post_activity’ );