* @license GPL-2.0-or-later */ defined( 'ABSPATH' ) || exit; // phpcs:ignore WordPress.Security.NonceVerification.Recommended $wcmq_filter = isset( $_GET['state'] ) ? sanitize_key( wp_unslash( $_GET['state'] ) ) : ''; if ( ! in_array( $wcmq_filter, array( 'pending', 'sending', 'sent', 'failed' ), true ) ) { $wcmq_filter = ''; } $wcmq_paged = Studiou_WCMQ_Admin::current_page(); $wcmq_total = Studiou_WCMQ_DB::count_rows( $wcmq_filter ); $wcmq_offset = ( $wcmq_paged - 1 ) * Studiou_WCMQ_Admin::PER_PAGE; $wcmq_rows = Studiou_WCMQ_DB::get_rows( $wcmq_filter, Studiou_WCMQ_Admin::PER_PAGE, $wcmq_offset ); $wcmq_states = array( '' => __( 'All', 'studiou-wc-mail-queue' ), 'pending' => __( 'Pending', 'studiou-wc-mail-queue' ), 'sending' => __( 'Sending', 'studiou-wc-mail-queue' ), 'sent' => __( 'Sent', 'studiou-wc-mail-queue' ), 'failed' => __( 'Failed', 'studiou-wc-mail-queue' ), ); ?>
id; ?> context ); ?> order_id; $wcmq_edit_url = ''; if ( $wcmq_order_id > 0 && function_exists( 'wc_get_order' ) ) { $wcmq_order = wc_get_order( $wcmq_order_id ); if ( $wcmq_order instanceof WC_Order ) { $wcmq_edit_url = $wcmq_order->get_edit_order_url(); } } if ( $wcmq_edit_url ) { printf( '#%d', esc_url( $wcmq_edit_url ), $wcmq_order_id ); } elseif ( $wcmq_order_id > 0 ) { // Order no longer exists. printf( '#%d', esc_attr__( 'Order no longer exists', 'studiou-wc-mail-queue' ), $wcmq_order_id ); } else { echo '—'; } ?> recipient ); ?> state ); ?> attempts; if ( (int) $wcmq_row->reclaims > 0 ) { printf( ' (+%d)', esc_attr__( 'Crash recoveries', 'studiou-wc-mail-queue' ), (int) $wcmq_row->reclaims ); } ?> scheduled_at ) ); ?> sent_at ) ); ?> last_error ); ?>
$wcmq_filter ) : array() ); ?>