get_status_counts(); // Get orders. $result = $orders_handler->get_orders( array( 'status' => $current_status, 'search' => $boxcart_search, 'location' => $location_filter, 'date_from' => $date_from, 'date_to' => $date_to, 'orderby' => $boxcart_orderby, 'order' => $boxcart_order, 'page' => $current_page, 'per_page' => 20, ) ); $orders = $result['items']; $total = $result['total']; $total_pages = $result['total_pages']; // Get locations for filter. $locations = $orders_handler->get_locations_for_filter(); // Settings for currency. $settings = get_option( 'boxcart_settings', array() ); $currency_symbol = isset( $settings['currency_symbol'] ) ? $settings['currency_symbol'] : '£'; $prices_enabled = isset( $settings['prices_enabled'] ) ? (bool) $settings['prices_enabled'] : true; // Show prices if pricing is enabled, or if any order on this page has a total (historical priced orders). $has_priced_orders = false; if ( ! $prices_enabled ) { foreach ( $orders as $order_check ) { if ( ! empty( $order_check['total'] ) && (float) $order_check['total'] > 0 ) { $has_priced_orders = true; break; } } } $show_prices = $prices_enabled || $has_priced_orders; // Check if payments are enabled — determines whether to show a separate Payment Status column. $payments_enabled = isset( $settings['payments_enabled'] ) ? (bool) $settings['payments_enabled'] : false; // Status labels and colors. $status_labels = BoxCart_Order::STATUSES; $status_colors = array( 'pending' => '#f0ad4e', 'processing' => '#5bc0de', 'ready' => '#5cb85c', 'completed' => '#777', 'cancelled' => '#d9534f', ); /** * Build pagination URL. * * @param int $page Page number. * @return string URL. */ function boxcart_orders_page_url( $page ) { $args = array( 'page' => 'boxcart-orders', 'paged' => $page, ); if ( ! empty( $_GET['status'] ) ) { $args['status'] = sanitize_text_field( wp_unslash( $_GET['status'] ) ); } if ( ! empty( $_GET['s'] ) ) { $args['s'] = sanitize_text_field( wp_unslash( $_GET['s'] ) ); } if ( ! empty( $_GET['location'] ) ) { $args['location'] = absint( $_GET['location'] ); } if ( ! empty( $_GET['date_from'] ) ) { $args['date_from'] = sanitize_text_field( wp_unslash( $_GET['date_from'] ) ); } if ( ! empty( $_GET['date_to'] ) ) { $args['date_to'] = sanitize_text_field( wp_unslash( $_GET['date_to'] ) ); } if ( ! empty( $_GET['orderby'] ) ) { $args['orderby'] = sanitize_text_field( wp_unslash( $_GET['orderby'] ) ); } if ( ! empty( $_GET['order'] ) ) { $args['order'] = sanitize_text_field( wp_unslash( $_GET['order'] ) ); } return add_query_arg( $args, admin_url( 'admin.php' ) ); } ?>

'#f0ad4e', 'awaiting_payment' => '#ff9800', 'processing' => '#5bc0de', 'paid' => '#4caf50', 'part_paid' => '#ff9800', 'failed' => '#d9534f', 'refunded' => '#9c27b0', 'cancelled' => '#d9534f', ); ?>
get_name() ); ?> -
—
1 ) : ?>