📋

order_lists(); ?>
'; print_r($booking_lists); echo ''; $count_foot_left_col = 0; $count_foot_right_col = 0; ?>
$status ) { ?>

0 ? wp_kses_post( wc_price( $price ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); ?> 0 ? wp_kses_post( wc_price( $ex_price ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); } else { echo '❌'; } ?> 0 ? wp_kses_post( wc_price( $item_total ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); ?>

0 ) ? wp_kses_post( wc_price( $total_price ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); ?> 0 ) ? wp_kses_post( wc_price( $total_additional ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); ?> 0 ) ? wp_kses_post( wc_price( $total_sale ) ) : esc_html__( 'FREE', 'abp-event-ticket' ); ?>
$limit, 'page_number' => $page_number, 'total' => $total_order, 'style' => 'ajax' ] ); ?> __( 'Invalid security token or Insufficient permissions.', 'abp-event-ticket' ), 'type' => 'warn' ], 403 ); } ob_start(); $filter_args = isset( $_POST ) ? array_map( 'sanitize_text_field', wp_unslash( $_POST ) ) : []; $limit = isset( $filter_args['page_item'] ) ? (int) $filter_args['page_item'] : 20; $data_limit = (int) ABPET_Function::get_option( 'abpet_per_page_item', 20 ); $filter_args['page_item'] = $limit > 0 ? $limit : $data_limit; if ( $limit > 0 && $data_limit !== $limit ) { update_option( 'abpet_per_page_item', $limit ); } $this->order_lists( $filter_args ); $html = ob_get_clean(); wp_send_json_success( [ 'html' => $html, 'msg' => esc_html__( 'Order Loaded Successfully !', 'abp-event-ticket' ), 'type' => 'success' ] ); } public function item_cancel(): void { if ( ! check_ajax_referer( 'abpet_admin_ajax_nonce', 'nonce', false ) || ! current_user_can( 'manage_options' ) ) { wp_send_json_error( [ 'msg' => __( 'Invalid security token or Insufficient permissions.', 'abp-event-ticket' ), 'type' => 'warn' ], 403 ); } $item_id = isset( $_POST['item_id'] ) ? sanitize_text_field( wp_unslash( $_POST['item_id'] ) ) : ''; if ( ! empty( $item_id ) ) { global $wpdb; $table_name = $wpdb->prefix . 'abpet_orders'; $booking_lists = ABPET_Query::get_booking_query( [ 'id' => $item_id ] ); if ( ! empty( $booking_lists ) && is_array( $booking_lists ) ) { $value = current( $booking_lists ); $others = $value['others'] ?? ''; if ( ! empty( $others ) ) { $others = json_decode( $others, true ) ?: []; $user_id = get_current_user_id(); $others['cancel_by'] = $user_id; $data = [ 'others' => wp_json_encode( $others ), 'order_status' => 'wc-cancelled', 'updated_at' => current_time( 'Y-m-d H:i:s' ) ]; $where = [ 'id' => (int) $item_id ]; // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching $wpdb->update( $table_name, $data, $where, [ '%s', '%s', '%s' ], [ '%d' ] ); } } wp_send_json_success( [ 'html' => '', 'msg' => esc_html__( 'Deleted Successfully !', 'abp-event-ticket' ), 'type' => 'success' ] ); } wp_send_json_error( [ 'html' => '', 'msg' => esc_html__( 'Something Error Occurred !', 'abp-event-ticket' ), 'type' => 'warn' ] ); } } new ABPET_Orders(); }