woocommerce/admin/woocommerce-admin-dashboard...

459 lines
15 KiB
PHP
Raw Normal View History

2011-08-09 15:16:18 +00:00
<?php
/**
2011-08-19 14:48:41 +00:00
* Functions used for displaying the WooCommerce dashboard widgets
2011-08-09 15:16:18 +00:00
*
2011-08-10 17:11:11 +00:00
* @author WooThemes
2011-08-09 15:16:18 +00:00
* @category Admin
2012-08-14 12:21:34 +00:00
* @package WooCommerce/Admin/Dashboard
* @version 1.6.4
2011-08-09 15:16:18 +00:00
*/
2012-10-15 10:32:24 +00:00
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
// Only hook in admin parts if the user has admin access
2012-09-20 15:35:15 +00:00
if ( current_user_can( 'view_woocommerce_reports' ) || current_user_can( 'manage_woocommerce' ) || current_user_can( 'publish_shop_orders' ) )
add_action( 'wp_dashboard_setup', 'woocommerce_init_dashboard_widgets' );
2012-08-14 12:21:34 +00:00
/**
* Init the dashboard widgets.
*
* @access public
* @return void
*/
function woocommerce_init_dashboard_widgets() {
global $current_month_offset, $the_month_num, $the_year;
$current_month_offset = 0;
if (isset($_GET['wc_sales_month'])) $current_month_offset = (int) $_GET['wc_sales_month'];
$the_month_num = date('n', strtotime('NOW '.($current_month_offset).' MONTH'));
$the_year = date('Y', strtotime('NOW '.($current_month_offset).' MONTH'));
$sales_heading = '';
if ($the_month_num!=date('m')) :
$sales_heading .= '<a href="index.php?wc_sales_month='.($current_month_offset+1).'" class="next">'.date_i18n('F', strtotime('01-'.($the_month_num+1).'-2011')).' &rarr;</a>';
endif;
2012-10-16 09:45:33 +00:00
$sales_heading .= '<a href="index.php?wc_sales_month='.($current_month_offset-1).'" class="previous">&larr; '.date_i18n('F', strtotime('01-'.($the_month_num-1).'-2011')).'</a><span>'.__( 'Monthly Sales', 'woocommerce' ).'</span>';
2012-08-14 12:21:34 +00:00
2012-09-20 15:35:15 +00:00
if ( current_user_can( 'publish_shop_orders' ) ) {
wp_add_dashboard_widget( 'woocommerce_dashboard_right_now', __( 'WooCommerce Right Now', 'woocommerce' ), 'woocommerce_dashboard_widget_right_now' );
wp_add_dashboard_widget( 'woocommerce_dashboard_recent_orders', __( 'WooCommerce Recent Orders', 'woocommerce' ), 'woocommerce_dashboard_recent_orders');
wp_add_dashboard_widget( 'woocommerce_dashboard_recent_reviews', __( 'WooCommerce Recent Reviews', 'woocommerce' ), 'woocommerce_dashboard_recent_reviews' );
}
2012-11-27 16:22:47 +00:00
2012-09-20 15:35:15 +00:00
if ( current_user_can( 'view_woocommerce_reports' ) || current_user_can( 'publish_shop_orders' ) ) {
wp_add_dashboard_widget( 'woocommerce_dashboard_sales', $sales_heading, 'woocommerce_dashboard_sales' );
}
2012-08-14 12:21:34 +00:00
}
2011-08-09 15:16:18 +00:00
/**
2012-02-25 15:17:11 +00:00
* WooCommerce Right Now widget.
2012-08-14 12:21:34 +00:00
*
2012-02-25 15:17:11 +00:00
* Adds a dashboard widget with shop statistics.
2012-08-14 12:21:34 +00:00
*
* @access public
* @return void
2011-08-09 15:16:18 +00:00
*/
2012-02-25 15:17:11 +00:00
function woocommerce_dashboard_widget_right_now() {
2011-09-20 10:30:21 +00:00
global $woocommerce;
2011-08-09 15:16:18 +00:00
2012-02-25 15:17:11 +00:00
$product_count = wp_count_posts( 'product' );
$product_cat_count = wp_count_terms( 'product_cat' );
$product_tag_count = wp_count_terms( 'product_tag' );
$product_attr_count = count( $woocommerce->get_attribute_taxonomies() );
$pending_count = get_term_by( 'slug', 'pending', 'shop_order_status' )->count;
$completed_count = get_term_by( 'slug', 'completed', 'shop_order_status' )->count;
$on_hold_count = get_term_by( 'slug', 'on-hold', 'shop_order_status' )->count;
$processing_count = get_term_by( 'slug', 'processing', 'shop_order_status' )->count;
2011-08-19 14:48:41 +00:00
?>
2012-02-25 15:17:11 +00:00
<div class="table table_shop_content">
<p class="sub woocommerce_sub"><?php _e( 'Shop Content', 'woocommerce' ); ?></p>
<table>
<tr class="first">
<?php
$num = number_format_i18n( $product_count->publish );
2012-10-16 14:46:21 +00:00
$text = _n( 'Product', 'Products', intval( $product_count->publish ), 'woocommerce' );
2012-02-25 15:17:11 +00:00
$link = add_query_arg( array( 'post_type' => 'product' ), get_admin_url( null, 'edit.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="first b b-products"><?php echo $num; ?></td>
<td class="t products"><?php echo $text; ?></td>
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $product_cat_count );
$text = _n( 'Product Category', 'Product Categories', $product_cat_count, 'woocommerce' );
$link = add_query_arg( array( 'taxonomy' => 'product_cat', 'post_type' => 'product' ), get_admin_url( null, 'edit-tags.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="first b b-product_cats"><?php echo $num; ?></td>
<td class="t product_cats"><?php echo $text; ?></td>
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $product_tag_count );
$text = _n( 'Product Tag', 'Product Tags', $product_tag_count, 'woocommerce' );
$link = add_query_arg( array( 'taxonomy' => 'product_tag', 'post_type' => 'product' ), get_admin_url( null, 'edit-tags.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="first b b-product_tag"><?php echo $num; ?></td>
<td class="t product_tag"><?php echo $text; ?></td>
2012-02-25 15:17:11 +00:00
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $product_attr_count );
$text = _n( 'Attribute', 'Attributes', $product_attr_count, 'woocommerce' );
$link = add_query_arg( array( 'page' => 'woocommerce_attributes' ), get_admin_url( null, 'admin.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="first b b-attributes"><?php echo $num; ?></td>
<td class="t attributes"><?php echo $text; ?></td>
</tr>
<?php do_action( 'woocommerce_right_now_shop_content_table_end' ); ?>
</table>
</div>
<div class="table table_orders">
<p class="sub woocommerce_sub"><?php _e( 'Orders', 'woocommerce' ); ?></p>
<table>
<tr class="first">
<?php
$num = number_format_i18n( $pending_count );
$text = __( 'Pending', 'woocommerce' );
$link = add_query_arg( array( 'post_type' => 'shop_order', 'shop_order_status' => 'pending' ), get_admin_url( null, 'edit.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="b b-pending"><?php echo $num; ?></td>
<td class="last t pending"><?php echo $text; ?></td>
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $on_hold_count );
$text = __( 'On-Hold', 'woocommerce' );
$link = add_query_arg( array( 'post_type' => 'shop_order', 'shop_order_status' => 'on-hold' ), get_admin_url( null, 'edit.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="b b-on-hold"><?php echo $num; ?></td>
<td class="last t on-hold"><?php echo $text; ?></td>
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $processing_count );
$text = __( 'Processing', 'woocommerce' );
$link = add_query_arg( array( 'post_type' => 'shop_order', 'shop_order_status' => 'processing' ), get_admin_url( null, 'edit.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="b b-processing"><?php echo $num; ?></td>
<td class="last t processing"><?php echo $text; ?></td>
</tr>
<tr>
2012-08-14 12:21:34 +00:00
2012-02-25 15:17:11 +00:00
<?php
$num = number_format_i18n( $completed_count );
$text = __( 'Completed', 'woocommerce' );
2012-06-09 19:11:06 +00:00
$link = add_query_arg( array( 'post_type' => 'shop_order', 'shop_order_status' => 'completed' ), get_admin_url( null, 'edit.php' ) );
2012-10-16 14:46:21 +00:00
$num = '<a href="' . esc_url($link ) . '">' . esc_html( $num ) . '</a>';
$text = '<a href="' . esc_url( $link ) . '">' . esc_html( $text ) . '</a>';
2012-02-25 15:17:11 +00:00
?>
<td class="b b-completed"><?php echo $num; ?></td>
<td class="last t completed"><?php echo $text; ?></td>
</tr>
<?php do_action( 'woocommerce_right_now_orders_table_end' ); ?>
</table>
</div>
<div class="versions">
2012-02-25 21:21:21 +00:00
<p id="wp-version-message">
2012-02-26 00:57:05 +00:00
<?php printf( __( 'You are using <strong>WooCommerce %s</strong>.', 'woocommerce' ), $woocommerce->version ); ?>
2012-02-25 21:21:21 +00:00
</p>
2012-02-25 15:17:11 +00:00
</div>
2011-08-19 14:48:41 +00:00
<?php
}
2011-08-09 15:16:18 +00:00
2011-08-19 14:48:41 +00:00
/**
* Recent orders widget
2012-08-14 12:21:34 +00:00
*
* @access public
* @return void
2011-08-19 14:48:41 +00:00
*/
2012-02-24 22:12:25 +00:00
function woocommerce_dashboard_recent_orders() {
2011-08-19 14:48:41 +00:00
$args = array(
'numberposts' => 8,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'shop_order',
2012-08-14 12:21:34 +00:00
'post_status' => 'publish'
2011-08-19 14:48:41 +00:00
);
$orders = get_posts( $args );
if ($orders) :
echo '<ul class="recent-orders">';
foreach ($orders as $order) :
2012-08-14 12:21:34 +00:00
2012-01-27 16:38:39 +00:00
$this_order = new WC_Order( $order->ID );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
echo '
<li>
2012-10-16 09:45:33 +00:00
<span class="order-status '.sanitize_title($this_order->status).'">'.ucwords(__($this_order->status, 'woocommerce')).'</span> <a href="'.admin_url('post.php?post='.$order->ID).'&action=edit">' . get_the_time( __( 'l jS \of F Y h:i:s A', 'woocommerce' ), $order->ID ) . '</a><br />
<small>'.sizeof($this_order->get_items()).' '._n('item', 'items', sizeof($this_order->get_items()), 'woocommerce').' <span class="order-cost">'.__('Total:', 'woocommerce' ) . ' ' . woocommerce_price($this_order->order_total).'</span></small>
2011-08-19 14:48:41 +00:00
</li>';
2011-08-09 15:16:18 +00:00
2011-08-19 14:48:41 +00:00
endforeach;
echo '</ul>';
else:
echo '<p>' . __( 'There are no product orders yet.', 'woocommerce' ) . '</p>';
2011-08-19 14:48:41 +00:00
endif;
2012-08-14 12:21:34 +00:00
}
2011-08-09 15:16:18 +00:00
2011-08-19 14:48:41 +00:00
/**
* Recent reviews widget
2012-08-14 12:21:34 +00:00
*
* @access public
* @return void
2011-08-19 14:48:41 +00:00
*/
2012-02-24 22:12:25 +00:00
function woocommerce_dashboard_recent_reviews() {
2011-08-19 14:48:41 +00:00
global $wpdb;
$comments = $wpdb->get_results( "SELECT *, SUBSTRING(comment_content,1,100) AS comment_excerpt
2011-08-19 14:48:41 +00:00
FROM $wpdb->comments
LEFT JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID)
2012-08-14 12:21:34 +00:00
WHERE comment_approved = '1'
AND comment_type = ''
2011-08-19 14:48:41 +00:00
AND post_password = ''
AND post_type = 'product'
ORDER BY comment_date_gmt DESC
LIMIT 5" );
2012-08-14 12:21:34 +00:00
2012-10-16 14:46:21 +00:00
if ( $comments ) {
2011-08-19 14:48:41 +00:00
echo '<ul>';
2012-10-16 14:46:21 +00:00
foreach ( $comments as $comment ) {
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
echo '<li>';
2012-08-14 12:21:34 +00:00
2012-10-16 14:46:21 +00:00
echo get_avatar( $comment->comment_author, '32' );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$rating = get_comment_meta( $comment->comment_ID, 'rating', true );
2012-08-14 12:21:34 +00:00
2012-10-16 14:46:21 +00:00
echo '<div class="star-rating" title="' . $rating . '">
<span style="width:'. ( $rating * 10 ) . 'px">' . $rating . ' ' . __( 'out of 5', 'woocommerce' ) . '</span></div>';
2012-08-14 12:21:34 +00:00
2012-10-16 14:46:21 +00:00
echo '<h4 class="meta"><a href="' . get_permalink( $comment->ID ) . '#comment-' . absint( $comment->comment_ID ) .'">' . esc_html__( $comment->post_title ) . '</a> reviewed by ' . esc_html( $comment->comment_author ) .'</h4>';
echo '<blockquote>' . wp_kses_data( $comment->comment_excerpt ) . ' [...]</blockquote></li>';
2012-08-14 12:21:34 +00:00
2012-10-16 14:46:21 +00:00
}
2011-08-19 14:48:41 +00:00
echo '</ul>';
2012-10-16 14:46:21 +00:00
} else {
echo '<p>' . __( 'There are no product reviews yet.', 'woocommerce' ) . '</p>';
}
2011-08-19 14:48:41 +00:00
}
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
/**
2012-08-14 12:21:34 +00:00
* Orders this month filter function - filters orders for the month
*
* @access public
* @param string $where (default: '')
* @return void
2011-08-19 14:48:41 +00:00
*/
function orders_this_month( $where = '' ) {
global $the_month_num, $the_year;
2012-08-14 12:21:34 +00:00
$month = $the_month_num;
$year = (int) $the_year;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$first_day = strtotime("{$year}-{$month}-01");
//$last_day = strtotime('-1 second', strtotime('+1 month', $first_day));
$last_day = strtotime('+1 month', $first_day);
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$after = date('Y-m-d', $first_day);
$before = date('Y-m-d', $last_day);
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$where .= " AND post_date > '$after'";
$where .= " AND post_date < '$before'";
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
return $where;
}
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
/**
* Sales widget
2012-08-14 12:21:34 +00:00
*
* @access public
* @return void
2011-08-19 14:48:41 +00:00
*/
2012-02-24 22:12:25 +00:00
function woocommerce_dashboard_sales() {
2012-08-14 12:21:34 +00:00
add_action( 'admin_footer', 'woocommerce_dashboard_sales_js' );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
?><div id="placeholder" style="width:100%; height:300px; position:relative;"></div><?php
}
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
/**
* Sales widget javascript
2012-08-14 12:21:34 +00:00
*
* @access public
* @return void
2011-08-19 14:48:41 +00:00
*/
2012-02-24 22:12:25 +00:00
function woocommerce_dashboard_sales_js() {
2012-08-14 12:21:34 +00:00
global $woocommerce, $wp_locale;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$screen = get_current_screen();
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
if (!$screen || $screen->id!=='dashboard') return;
2012-08-14 12:21:34 +00:00
global $current_month_offset, $the_month_num, $the_year;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
// Get orders to display in widget
add_filter( 'posts_where', 'orders_this_month' );
$args = array(
'numberposts' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_type' => 'shop_order',
'post_status' => 'publish' ,
'suppress_filters' => false,
'tax_query' => array(
array(
'taxonomy' => 'shop_order_status',
2012-06-18 11:44:48 +00:00
'terms' => apply_filters( 'woocommerce_reports_order_statuses', array( 'completed', 'processing', 'on-hold' ) ),
'field' => 'slug',
'operator' => 'IN'
)
)
2011-08-19 14:48:41 +00:00
);
$orders = get_posts( $args );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$order_counts = array();
$order_amounts = array();
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
// Blank date ranges to begin
$month = $the_month_num;
$year = (int) $the_year;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$first_day = strtotime("{$year}-{$month}-01");
$last_day = strtotime('-1 second', strtotime('+1 month', $first_day));
2012-08-14 12:21:34 +00:00
if ((date('m') - $the_month_num)==0) :
2011-08-19 14:48:41 +00:00
$up_to = date('d', strtotime('NOW'));
else :
$up_to = date('d', $last_day);
endif;
$count = 0;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
while ($count < $up_to) :
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$time = strtotime(date('Ymd', strtotime('+ '.$count.' DAY', $first_day))).'000';
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$order_counts[$time] = 0;
$order_amounts[$time] = 0;
2011-08-09 15:16:18 +00:00
2011-08-19 14:48:41 +00:00
$count++;
endwhile;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
if ($orders) :
foreach ($orders as $order) :
2012-08-14 12:21:34 +00:00
2012-01-27 16:38:39 +00:00
$order_data = new WC_Order($order->ID);
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
if ($order_data->status=='cancelled' || $order_data->status=='refunded') continue;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$time = strtotime(date('Ymd', strtotime($order->post_date))).'000';
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
if (isset($order_counts[$time])) :
$order_counts[$time]++;
else :
$order_counts[$time] = 1;
endif;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
if (isset($order_amounts[$time])) :
$order_amounts[$time] = $order_amounts[$time] + $order_data->order_total;
else :
$order_amounts[$time] = (float) $order_data->order_total;
endif;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
endforeach;
endif;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
remove_filter( 'posts_where', 'orders_this_month' );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
/* Script variables */
$params = array(
2012-10-12 08:39:31 +00:00
'currency_symbol' => get_woocommerce_currency_symbol(),
2012-10-12 08:45:37 +00:00
'number_of_sales' => absint( array_sum( $order_counts ) ),
'sales_amount' => woocommerce_price( array_sum( $order_amounts ) ),
2012-10-12 08:39:31 +00:00
'sold' => __( 'Sold', 'woocommerce' ),
'earned' => __( 'Earned', 'woocommerce' ),
'month_names' => array_values( $wp_locale->month_abbrev ),
2011-08-19 14:48:41 +00:00
);
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$order_counts_array = array();
foreach ($order_counts as $key => $count) :
$order_counts_array[] = array($key, $count);
endforeach;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$order_amounts_array = array();
foreach ($order_amounts as $key => $amount) :
$order_amounts_array[] = array($key, $amount);
endforeach;
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
$order_data = array( 'order_counts' => $order_counts_array, 'order_amounts' => $order_amounts_array );
2012-08-14 12:21:34 +00:00
$params['order_data'] = json_encode($order_data);
// Queue scripts
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
2012-08-14 12:21:34 +00:00
wp_register_script( 'woocommerce_dashboard_sales', $woocommerce->plugin_url() . '/assets/js/admin/dashboard_sales'.$suffix.'.js', 'jquery', '1.0' );
wp_register_script( 'flot', $woocommerce->plugin_url() . '/assets/js/admin/jquery.flot'.$suffix.'.js', 'jquery', '1.0' );
2011-09-16 08:51:19 +00:00
wp_register_script( 'flot-resize', $woocommerce->plugin_url() . '/assets/js/admin/jquery.flot.resize'.$suffix.'.js', 'jquery', '1.0' );
2012-08-14 12:21:34 +00:00
2011-08-19 14:48:41 +00:00
wp_localize_script( 'woocommerce_dashboard_sales', 'params', $params );
2012-08-14 12:21:34 +00:00
wp_print_scripts('flot');
2011-09-16 08:51:19 +00:00
wp_print_scripts('flot-resize');
2011-08-19 14:48:41 +00:00
wp_print_scripts('woocommerce_dashboard_sales');
2012-08-14 12:21:34 +00:00
}