%1$s %2$s

', esc_html__( 'Easy Digital Downloads is performing a database migration via WP-CLI.', 'easy-digital-downloads' ), esc_html__( 'This summary will be available when that has completed.', 'easy-digital-downloads' ) ); return; } global $wpdb; $orders = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_type = 'edd_payment' LIMIT 1" ); if ( ! empty( $orders ) ) { $url = add_query_arg( array( 'page' => 'edd-upgrades', 'edd-upgrade' => 'v30_migration', ), admin_url( 'index.php' ) ); printf( '

%1$s %2$s%4$s

', esc_html__( 'Easy Digital Downloads needs to upgrade the database.', 'easy-digital-downloads' ), esc_html__( 'This summary will be available when that has completed.', 'easy-digital-downloads' ), esc_url( $url ), esc_html__( 'Begin the upgrade.', 'easy-digital-downloads' ) ); return; } } wp_enqueue_script( 'edd-admin-dashboard' ); /** * Action hook to add content to the dashboard widget. * This content will not be replaced by the AJAX function: * only the "edd-loading" content will. * * @since 2.11.4 */ do_action( 'edd_dashboard_sales_widget' ); ?>

$range, 'output' => 'formatted', 'revenue_type' => 'net', ); if ( 'total' === $range ) { unset( $args['range'] ); } // Remove filters so that deprecation notices are not unnecessarily logged outside of reports. remove_all_filters( 'edd_report_views' ); $stats = new EDD\Stats( $args ); $data[ $range ] = array( 'earnings' => $stats->get_order_earnings(), 'count' => $stats->get_order_count(), ); } return $data; } /** * Loads the dashboard sales widget via ajax * * @since 2.1 * @return void */ function edd_load_dashboard_sales_widget( ) { if ( ! current_user_can( apply_filters( 'edd_dashboard_stats_cap', 'view_shop_reports' ) ) ) { die(); } $stats = new EDD_Payment_Stats(); $data = edd_get_dashboard_sales_widget_data(); ?>
5, 'status' => edd_get_net_order_statuses(), 'type' => 'sale', ) ); if ( $orders ) { ?>

'edd-payment-history', ) ); ?>
5, 'status' => 'complete' ) ) ); } ?>
publish ) { $text = _n( '%s ' . edd_get_label_singular(), '%s ' . edd_get_label_plural(), $num_posts->publish, 'easy-digital-downloads' ); $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); if ( current_user_can( 'edit_products' ) ) { $text = sprintf( '%1$s', $text ); } else { $text = sprintf( '%1$s', $text ); } $items[] = $text; } return $items; } add_filter( 'dashboard_glance_items', 'edd_dashboard_at_a_glance_widget', 1 );