get_row( $wpdb->prepare( "SELECT o.*, u.display_name, u.user_email, pay.payment_gateway, pay.currency AS payment_currency FROM {$wpdb->prefix}aimslms_course_orders o JOIN {$wpdb->users} u ON u.ID = o.user_id LEFT JOIN {$wpdb->prefix}aimslms_course_payment pay ON pay.order_id = o.id WHERE o.id = %d", $order_id ), ARRAY_A ); if ( ! $order_row ) { wp_die( esc_html__( 'Order not found.', 'aims-infosoft-lms' ) ); } $user = get_userdata( $order_row['user_id'] ); $course = get_post( $order_row['course_id'] ); $countries = aimslms_get_countries(); $states = aimslms_get_states(); $selected_country = get_user_meta( $order_row['user_id'], '_aimslms_billing_country', true ); $selected_state = get_user_meta( $order_row['user_id'], '_aimslms_billing_state', true ); $amount = (float) $order_row['order_total']; $gateway = $order_row['payment_gateway'] ?? ''; $currency = $order_row['payment_currency'] ?? get_option( 'aimslms_currency', 'USD' ); $transaction_id = $order_row['transaction_id'] ? $order_row['transaction_id'] : '-'; $billing_phone = aimslms_admin_user_meta( $order_row['user_id'], '_aimslms_billing_phone' ); $billing_phone = $billing_phone ? $billing_phone : '-'; // Razorpay stores amount in paise. if ( 'razorpay' === $gateway ) { $amount = $amount / 100; $currency = 'INR'; } ?>


#





display_name ); ?>


user_email ); ?>



#





post_title : '-' ); ?> x 1 $currency ) ) ); ?>