get_all_images( array( 'limit' => $per_page, 'offset' => $offset, 'orderby' => 'created_at', 'order' => 'DESC', 'search' => $search, 'gender' => $gender_filter, 'category' => $category_filter, ) ); $total_images = $db->get_total_count( $search, $gender_filter, $category_filter ); $total_pages = ceil( $total_images / $per_page ); ?>


render_stats(); ?>

0 ) : ?>

render_image_card( $image ); ?>
1 ) : ?>
add_query_arg( 'paged', '%#%' ), 'format' => '', 'prev_text' => __( '«', 'ai-virtual-try-on-for-woocommerce' ), 'next_text' => __( '»', 'ai-virtual-try-on-for-woocommerce' ), 'total' => $total_pages, 'current' => $paged, ) ) ); ?>
get_total_count(); // This month $month_start = gmdate('Y-m-01 00:00:00'); $month_images = $db->get_count_since_date( $month_start ); // This week $week_start = gmdate('Y-m-d 00:00:00', strtotime('monday this week')); $week_images = $db->get_count_since_date( $week_start ); // Unique products $unique_products = $db->get_unique_products_count(); ?>
local_image_url ) ) { return $image->local_image_url; } return $image->generated_image_url; } /** * Render image card * * @param object $image Image object */ private function render_image_card( $image ) { $product = wc_get_product( $image->product_id ); $product_name = $product ? $product->get_name() : __( 'Product Deleted', 'ai-virtual-try-on-for-woocommerce' ); $product_url = $product ? get_edit_post_link( $image->product_id ) : '#'; $image_url = $this->get_image_url( $image ); ?>
<?php esc_attr_e( 'Generated Try-On', 'ai-virtual-try-on-for-woocommerce' ); ?>
model_gender ) ) : ?> model_gender ) ); ?> category ) ) : ?> category ) ) ); ?> created_at ), current_time( 'timestamp' ) ) ); ?>